possible to reload variable in "IF" ?

Katana

Client
Регистрация
28.03.2021
Сообщения
81
Благодарностей
7
Баллы
8
Hello, I would like to know if there is a method to "reload" the variable.
Let me explain, I have a long series of if to test so I created it under google sheet to save my time.

example:
"{-Variable.test-}" == "hi" || "{-Variable.test-}" == "hello" etc...

if I paste my text as it is in googlesheet, the variable is not in green, yet I do have a variable s 'calling "Month or Year" but it doesn't link the two.

How can I do ? because I have a list of 2500 words to match on a single variable on "if".

thanks in advance

ps : the photo explains the situation well, if the variable is in green no problem, it will work well, on the other hand if the text is in another color it will not work
 

Вложения

Последнее редактирование:

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 807
Баллы
113
How can I do ? because I have a list of 2500 words to match on a single variable on "if".
Save all these words to a file, and then bind the file to a list.
After that, you can try to get a line from the list that matches Regexp, and as a regex use your variable.
And then check the result variable. If it is empty then the list doesn't contain your word, if it is not empty then the list contains the word.

87803
 
  • Спасибо
Реакции: Katana

Katana

Client
Регистрация
28.03.2021
Сообщения
81
Благодарностей
7
Баллы
8
Merci @nicanil

when I try this method, it can find words when they are not the searched words example:
ha (in text) - happy (in list)
except the word is ha and not happy.
I transform the text into a list and I search in the word list if it matches. I have this result on all the little words
 
Последнее редактирование:

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 807
Баллы
113
Add ^ before the regular expression and $ after it. So your regex should look like this ^{-Variable.test-}$
 
  • Спасибо
Реакции: Katana

Katana

Client
Регистрация
28.03.2021
Сообщения
81
Благодарностей
7
Баллы
8
thank you @nicanil i try this

edit :
sorry i didn't see that you put it in the previous thread
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)