2.3.3 The Question Mark In regular expressions, the meta character?makes the preceding character optional. This symbol matches zero or one instance of the preceding character. For example, the regular expression[T]?hemeans: Optional uppercase T, followed by a lowercaseh, followed bya lowercasee...
Alternation allows for defining alternative matches. Encase the alternative strings in single quotes and separate each with an escaped pipe character (\|). For example, to search for the wordsbashoraliasin the.bashrcfile, use: grep 'bash\|alias' .bashrcCopy Alternatively, use extended regex and ...