(any number of a's, followed by a b, two characters and an e)
regex(7) explains all the neat things you can do with RegularExpressions and the different types. perlre(1) explains perl's extended regex's.
will search for every occurance of "wlug.linuxcare.co.nz" in all the files in this directory.
will search for "foo" and replace it with "baz" in a.txt and output the result in b.txt
awk(1) is a tool for doing processing on record orientated files. It allows you to specify different actions to perform based on regex's.
See also: File Globs
Tricks and Traps:
To match any lowercase vowel: /[aeiou?/
To match any lowercase or uppercase vowel: /[aeiouAEIOU?/
To match any single digit: /[0123456789?/
The same thing: /[0-9?/
Any single digit or minus: /[0-9\-?/
Any lowercase letter: /[a-z?/
The ^ character can be used to negate a [] pattern:
To match anything except a lowercase letter: /[^a-z?/
To match anything except a lowercase or uppercase letter, digit or underscore: /[^a-zA-Z0-9_?/
These can be used with * too, so:
/[0-9?*/
matches any number of digits, including no digits.
Note: These apply to perl regular expressions. They will most likely work in other regex parsers such as sed, but there may be subtle differences.
To match any digit: /[\d?/ (Equivalent to /[0-9?/)
To match any 'word' character: /[\w?/ (Equivalent to /[a-zA-Z0-9_?/)
To match any space character: /[\s?/ (Equivalent to /[ \r\t\n\f?/)
\D, \W and \S are the negated versions of \d, \w and \s:
/[\D?/ is equivalent to /[^0-9?/
lib/main.php:944: Notice: PageInfo: Cannot find action page