Pattern groups
Applying a regular expression to a group of characters or metacharacters.
Often you need to apply a regular expression to a group of characters or metacharacters.
To group a set, put the characters in parentheses ( ).
The group is given a number in the Match Groups box and the matching text is displayed next to it.
If a match occurs, you can see which text matches which group in the Match Groups box.
For example, you have an HTML code with <UL>first in the text.
You type (<.L>)([a-z ]*) as the regular expression.
In the Text field, <UL>first is highlighted in red.
In Match Groups, the groups are broken down:
- Group 1 <UL>
- Group 2 first