(sed.info.gz) Extended regexps
Info Catalog
(sed.info.gz) Reporting Bugs
(sed.info.gz) Top
(sed.info.gz) Concept Index
Extended regular expressions
****************************
The only difference between basic and extended regular expressions
is in the behavior of a few characters: `?', `+', parentheses, and
braces (`{}'). While basic regular expressions require these to be
escaped if you want them to behave as special characters, when using
extended regular expressions you must escape them if you want them _to
match a literal character_.
Examples:
`abc?'
becomes `abc\?' when using extended regular expressions. It
matches the literal string `abc?'.
`c\+'
becomes `c+' when using extended regular expressions. It matches
one or more `c's.
`a\{3,\}'
becomes `a{3,}' when using extended regular expressions. It
matches three or more `a's.
`\(abc\)\{2,3\}'
becomes `(abc){2,3}' when using extended regular expressions. It
matches either `abcabc' or `abcabcabc'.
`\(abc*\)\1'
becomes `(abc*)\1' when using extended regular expressions.
Backreferences must still be escaped when using extended regular
expressions.
Info Catalog
(sed.info.gz) Reporting Bugs
(sed.info.gz) Top
(sed.info.gz) Concept Index
automatically generated byinfo2html