Use Regex in a Switch

convict29

Пользователь
Регистрация
10.07.2014
Сообщения
114
Благодарностей
3
Баллы
18
Hey,
is it possible to use regex in the Switch?

I want to say that:
Value = (!?)(Password|Pass)
 

convict29

Пользователь
Регистрация
10.07.2014
Сообщения
114
Благодарностей
3
Баллы
18
Edit for the regex
I want to say that:
Value = (?i)(Password|Pass)
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 267
Благодарностей
5 853
Баллы
113
No, unfortunately, regex cannot be used in Switch action. You should specify certain value and compare variable with it.
 

convict29

Пользователь
Регистрация
10.07.2014
Сообщения
114
Благодарностей
3
Баллы
18

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 267
Благодарностей
5 853
Баллы
113

convict29

Пользователь
Регистрация
10.07.2014
Сообщения
114
Благодарностей
3
Баллы
18
Have you manaded to use regex in it?)
Yes, i didn't took the time to explain how coz i had to go.
Here is what i did:
Word Processing -> Regex
To the text field i entered the variable with the word "Password", remeber this variable could be "Pass" or "password" or "pass" or "Pass-word" and so on.
To the Regex placeholder i enter my regex "(?i).*pass.* "
And store it to a new variable "RegexForPass" then to the switcher i entered the variable "RegexForPass" and works perfect
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 267
Благодарностей
5 853
Баллы
113
It's actually some kind of workaround) Regex is not used directly in Switch action. However, result is achived. Well done!)
 

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