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

  • Автор темы Автор темы irmscher
  • Дата начала Дата начала

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?
 
Then you have to make a loop and check each regexp separately.
 

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