-
The order of precedence of operators in POSIX extended regular expression is as follows.
- Collation-related bracket symbols
[==]
,[::]
,[..]
- Escaped characters
\
- Character set (bracket expression)
[]
- Grouping
()
- Single-character-ERE duplication
*
,+
,?
,{m,n}
- Concatenation
- Anchoring
^
,$
- Alternation
|
- Collation-related bracket symbols
-
Some regular expression patterns are defined using a single leading backslash, e.g.,
\s
,\b
, etc. However, since special …
Search for Files in Command-line Using grep
The article
14 Practical examples of the grep command
has some good examples on how to use the grep
command.
-
The Perl style (option
-P
) regular expression is more powerful than the basic (default) and extended (option-E
) regular expression. It is suggested that you use the perl style as …