Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


how to use Grouping regular expressions ?


A regular expression can have literal characters in it, and also zero-width positional patterns. Each literal character or positional pattern is an atom in a regular expression. You may also group several atoms together into a small regular expression that is part of a larger regular expression. One might be inclined to call such a grouping a "molecule," but normally it is also called an atom.

In older Unix-oriented tools like grep, subexpressions must be grouped with escaped parentheses, e.g. /\(Mary\)/. In Perl and most more recent tools (including egrep), grouping is done with bare parentheses, but matching a literal parenthesis requires escaping it in the pattern (the example to the side follows Perl).


asked Sep 13, 2013 in Regular-exp by rajesh
edited Sep 12, 2013
0 votes
24 views



Related Hot Questions



Government Jobs Opening


...