3.1.1. Regular expressions on the left side of "s///"
All versions of sed support Basic Regular Expressions (BREs). For
the syntax of BREs, enter "man ed" at a Unix shell prompt. A
technical description of BREs from IEEE POSIX 1003.1-2001 and the
Single UNIX Specification Version 3 is available online at:
https://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap09.html#tag_09_03
Sed normally supports BREs plus '\n' to match a newline in the
pattern space, plus '\xREx' as equivalent to '/RE/', where 'x' is any
character other than a newline or another backslash.
Some versions of sed support supersets of BREs, or "extended
regular expressions", which offer additional metacharacters for
increased flexibility. For additional information on extended REs
in GNU sed, see sections 3.7 ("GNU/POSIX extensions to regular
expressions") and 6.7.3 ("Special syntax in REs"), below.
Though not required by BREs, some versions of sed support \t to
represent a TAB, \r for carriage return, \xHH for direct entry of
hex codes, and so forth. Other versions of sed do not.
ssed (super-sed) introduced many new features for LHS pattern
matching, too many to give here. The complete list is found in
section 6.7.3.H ("ssed"), below.