This is a list of commonly used regular expressions. Because regular expressions can vary in notation (POSIX (Extended), Perl, Javascript, etc.) each matching topic has a few possible notations as a solution. If it is not known to which type the regular expression should conform it is marked Unknown or Flat. If you have any suggestions that should be listed here, please post them in the anonymous contact form. IP address
Matches any 0.0.0.0 to 999.999.999.999 number, grouping them in seperate matches. String trimming
Matches whitespaces on the beginning or whitespaces on the end of a string. SGML tag and content
This can be used for any SGML like language, should also include HTML and XML. Matches something between < and > with attributes and a corresponding closing tag. Date: Mmm dd hh:mm:ss
Match any date like: "Feb 18 14:04:58", commonly found in logfiles. Generally matching "Mmm dd hh:mm:ss". The last form allows for the day and the hour number to not be prefixed with a zero. Week day
Match any english three letter day of the week ("Mon"/"Tue"/"Wed"/"Thu"/"Fri"/"Sat"/"Sun"). Adblock a domain
The first matches all protocols (http, ftp, etc) and all subdomains with information.com as top level domain. The second matches anything from linkz.com. These can be used as filters in the popular Firefox Adblock extension. |