Extended Regular Expressions
The three utilities egrep, grep when run with the –E option (similar to egrep), and gawk provide all the special characters that are included in ordinary regular expressions, except for \( and \), as well as several others. The vi (vim) editor includes the additional characters as well as \( and \). Patterns using the extended set of special characters are called full regular expressions, or extended regular expressions.
Two of the additional special characters are the plus sign (+) and question mark (?). They are similar to the *, which matches zero or more occurrences of the previous character. The plus sign matches one or more occurrences of the previous character, whereas the question mark matches zero or one ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access