Syntax of the builtin regular expression library
Regular expressions (``RE''s), as defined by POSIX, come in two flavors: extended REs (``EREs'') and basic REs (``BREs''). EREs are roughly those of the traditional egrep, while BREs are roughly those of the traditional ed. This implementation adds a third flavor, advanced REs (``AREs''), basically EREs with some significant extensions.
This manual page primarily describes AREs. BREs mostly exist for backward compatibility in some old programs; they will be discussed at the end. POSIX EREs are almost an exact subset of AREs. Features of AREs that are not present in EREs will be indicated.