REGEX(7x) 7x REGEX(7x)

This manual page is part of Cross-Unix Documentation which is an attempt to provide documentation of similarities and (noteworthy) differencies between Unix-like systems. To be used as an addition to the POSIX standard.

regexExtensions to POSIX regular expressions

Anchors to beginning of a word (4.4BSD, NetBSD, OpenBSD, FreeBSD)
Anchors to end of a word (4.4BSD, NetBSD, OpenBSD, FreeBSD)
Anchors to beginning of a word (NetBSD, OpenBSD, FreeBSD, GNU, musl)
Anchors to end of a word (NetBSD, OpenBSD, FreeBSD, GNU, musl)
Matches word boundary (GNU, musl)
Matches word non-boundary characters (GNU, musl)
Matches word characters (GNU)
Matches non-word characters (GNU)
matches the beginning of the whole input (GNU)
matches the beginning of the whole input (GNU)

Derived from laurikari's tre library.

  • "[a-z--@] is accepted as [a-z]|[--@]"
  • \xHH \x{HHHH}
  • \+ and \? treated as repetitions in BRE
  • \| as alternation in BRE
  • Accept unknown escape char as literal
  • "empty branch is unspecified (), (|a), (a|) here they are not rejected but match on empty string"

https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002dextended-regular-expression-syntax.html

  • \+ and \? treated as repetitions

https://www.austingroupbugs.net/view.php?id=1919

Haelwenn (lanodan) Monnier <contact+c-u-d@hacktivis.me>

2025-04-24 Linux 6.12.21-gentoo-x86_64