Expression Archivehttp://www.geekzilla.co.uk/Innovation Team's dumping grounden-usTue, 10 Jun 2003 04:00:00 GMTTue, 10 Jun 2003 09:41:01 GMTGeekZilla.co.ukeditor@GeekZilla.co.ukwebmaster@GeekZilla.co.uk Regex for a HTML tag http://www.geekzilla.co.uk/view42A9B3CF-9E8D-43BD-86FE-C2422FB8F9F3.htm Regex for a HTML tag This can proove invaluable when you're wanting to replace keywords in HTML without spoiling the tags themselves. Particularly useful in SEO. 26/11/2007 http://www.geekzilla.co.uk/view42A9B3CF-9E8D-43BD-86FE-C2422FB8F9F3.htm Date Regular Expression (dd/MMM/yyyy) http://www.geekzilla.co.uk/view653502BD-00B7-4012-9786-F941208F5F0C.htm Date Regular Expression (dd/MMM/yyyy) The following matches: *01/JAN/2007 *22/Feb/2006 But doesn't match: *01/01/2007 *22/02/2007 *01 Jan 2007 #c#^(([0-9])|([0-2][0-9])|([3][0-1]))\/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\/\d{4}$ 26/10/2007 http://www.geekzilla.co.uk/view653502BD-00B7-4012-9786-F941208F5F0C.htm Hex code Regular Expression (#F0F0F0) http://www.geekzilla.co.uk/view05C802F8-F1DF-4097-A969-0EACB51C7834.htm Hex code Regular Expression (#F0F0F0) The following matches valid HTML hexadecimal color codes. The # symbol is optional. It will except either the 3 digit form for the 216 Web safe colors, or the full 6 digit form. #c#^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$ 12/10/2007 http://www.geekzilla.co.uk/view05C802F8-F1DF-4097-A969-0EACB51C7834.htm Email Regex Pattern http://www.geekzilla.co.uk/view5A571933-A163-4A8F-B150-3357B4558AFA.htm Email Regex Pattern #c#^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$ 12/10/2007 http://www.geekzilla.co.uk/view5A571933-A163-4A8F-B150-3357B4558AFA.htm Time Regular Expression http://www.geekzilla.co.uk/viewA9DC7ADA-887E-4017-A6CA-B8AD78B1FAF8.htm Time Regular Expression #c#^([0-1][0-9]|[2][0-3]):([0-5][0-9])$ 12/10/2007 http://www.geekzilla.co.uk/viewA9DC7ADA-887E-4017-A6CA-B8AD78B1FAF8.htm ISBN Number regular expression http://www.geekzilla.co.uk/viewD8902276-CCD3-4B93-8D27-A7A1908D25D3.htm ISBN Number regular expression Examples 4/8/2006 http://www.geekzilla.co.uk/viewD8902276-CCD3-4B93-8D27-A7A1908D25D3.htm IP Address regular expression http://www.geekzilla.co.uk/view0CBFD9A7-621D-4B0C-9554-91FD48AADC77.htm IP Address regular expression #c# 4/8/2006 http://www.geekzilla.co.uk/view0CBFD9A7-621D-4B0C-9554-91FD48AADC77.htm Email Address Regular Expression http://www.geekzilla.co.uk/view0B840FC8-E8B1-4EDD-888B-41F4D8AB7E0C.htm Email Address Regular Expression #c# 26/7/2006 http://www.geekzilla.co.uk/view0B840FC8-E8B1-4EDD-888B-41F4D8AB7E0C.htm Mail and News Regular Expression http://www.geekzilla.co.uk/view4FE04F67-31D8-4A4C-A627-EB6EB5A3519C.htm Mail and News Regular Expression #c# 26/7/2006 http://www.geekzilla.co.uk/view4FE04F67-31D8-4A4C-A627-EB6EB5A3519C.htm URL Regular Expression http://www.geekzilla.co.uk/view2D3B0109-C1B2-4B4E-BFFD-E8088CBC85FD.htm URL Regular Expression #c# 26/7/2006 http://www.geekzilla.co.uk/view2D3B0109-C1B2-4B4E-BFFD-E8088CBC85FD.htm IsGuid() (Regular Expression Guid Match) http://www.geekzilla.co.uk/view8AD536EF-BC0D-427F-9F15-3A1BC663848E.htm IsGuid() (Regular Expression Guid Match) A regular expression for validating a string as being a Guid is.. Example usage Below is a function I try to keep handy which tests a string for a Guid and returns True or False. 14/6/2006 http://www.geekzilla.co.uk/view8AD536EF-BC0D-427F-9F15-3A1BC663848E.htm