in reply to Jonathan Lamothe

Basic vs. Extended regular expressions.

sed (and evidently ed) use basic regular expressions

awk uses extended regular expressions.

grep defaults to basic, with `-E` using extended.

Since those characters are also special to the shell, you might see them escaped from that purpose, even when they appear in a sed/grep command line.

in reply to Jonathan Lamothe

Yes, like I said, in basic regular expressions those characters only have special meaning when escaped. In extended regular expressions, they have special meaning unless escaped.

Both types of regular expressions are well documented in the latest Single UNIX Specification from The Open Group. Older versions of SUS are available from Debian contrib (or non-free?).

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.