Special Characters
Most characters in regular expressions, such as alphanumeric characters, match the literal characters. For example, the find -e /search/ command matches any occurrence containing “search”, such as “searching”, “searched”, and “research”. Special characters allow a regular expression to match more than one string. For example, a period (.) matches any single character. The command find /s.t/ -e finds “sat”, “set”, “sit” and any other three characters beginning with “s” and ending in “t”.
Other special characters include ^, $, ?, +, *, |, [], and ( ). These characters are discussed in the following sections.
Special characters can be preceded by a back slash ( \ ) when you do not want them to be interpreted as special. For example, to interpret the period literally, place it after a \. For example, to search your document for numbers between 100 and 199 ending in “.5”, you would issue the command find /1..\.5/ -e. The first two periods act as wildcards for any character, but the third period following the backslash is interpreted as a literal period. This command would also match strings with letters in them, such as 1ab.5.