A regular expression grouping construct is similar to what a parenthetical statement is to math operations. Group constructs bind expressions together to evaluate specific information in a specific order. The bracket
[ ] grouping construct groups evaluation criteria together for evaluation. The regular expression will consider all data in the group
[ ] for matching to remain
The parentheses grouping constructs in regular expressions are used to group commands together to determine the order of processing. Similar to other programming languages, equations in the parentheses are evaluated first before the rest of the expression. The parentheses grouping constructs can also be used with the OR ...