Store regex string that has matched word/phrase into a variable

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Благодарностей
6
Баллы
18
Hello

So I'm using a complex regex in order to match a certain word inside text, like this one: (regex1|regex2|regex3|regex4|regex5...etc)

When some word is matched by any of these I want to know what was the exact regex that has matched the word/phrase and then store it into a variable.

Is that possible?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Then you have to make a loop and check each regexp separately.
 

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