RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Hosting Spotlight

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 9
Title Test Details PayPal IPN Timestamp
Expression
^(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2}) (?<month>[a-zA-Z]{3}) (?<day>\d{1,}), (?<year>\d{4}) (?<timezone>[a-zA-Z]{3})$
Description
Breaks a PayPal IPN (instant payment notification) into it's respective parts via Groups.
Matches
18:30:30 Jan 1, 2009 PST | 05:04:50 Apr 12, 2009 EDT
Non-Matches
2:30:41 Aug 9, 2007 EST | 10:30:41 August 9, 2007 EST
Author Rating: Not yet rated. Brad Williams
Title Test Details JavaScript Date.toString() Timestamp
Expression
^(?<dayOfWeek>\w{3}) (?<monthName>\w{3}) (?<day>\d{1,2}) (?<year>\d{4})? ?(?<hours>\d{1,2}):(?<minutes>\d{1,2}):(?<seconds>\d{1,2}) (GMT|UTC)(?<timeZoneOffset>[-+]?\d{4}) (?<year>\d{4})?\(?(?<timeZoneName>[a-zA-Z\s]+)?\)?$
Description
Breaks JavaScript Date.toString() out into groups to allow easy reassembly. Works in FireFox 3.0.8, IE 8, Maxthon, Safari, and Chrome
Matches
Wed Jan 19 2005 01:30:00 GMT-0500 (Eastern Standard Time) | Wed, 19 Jan 01:30:00 GMT+0800 2005
Non-Matches
anything else
Author Rating: Not yet rated. Brad Williams
Title Test Details URL with named groups
Expression
(?<protocol>(http|ftp|https|ftps):\/\/)?(?<site>[\w\-_\.]+\.(?<tld>([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))+(?<port>:[0-9]+)?\/?)((?<resource>[\w\-\.,@^%:/~\+#]*[\w\-\@^%/~\+#])(?<queryString>(\?[a-zA-Z0-9\[\]\-\._+%\$#\~',]*=[a-zA-Z0-9\[\]\-\._+%\$#\~',]*)+(&[a-zA-Z0-9\[\]\-\._+%\$#\~',]*=[a-zA-Z0-9\[\]\-\._+%\$#\~',]*)*)?)?
Description
Based on the work of N H (http://regexlib.com/REDetails.aspx?regexp_id=96). Adds named groups including port and top-level-domain (tld), added ftps protocol, makes protocol optional, makes slash after site optional.
Matches
google.com | http://mysite.org:80/thispage.asp | ftp://ftp.upload.com/
Non-Matches
nomatchcom
Author Rating: Not yet rated. Brad Williams
Title Test Details URL
Expression
((http|ftp|https|ftps):\/\/)?[\w\-_\.]+\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))+(:[0-9]+)?\/?(([\w\-\.,@^%:/~\+#]*[\w\-\@^%/~\+#])((\?[a-zA-Z0-9\[\]\-\._+%\$#\=~',]*=[a-zA-Z0-9\[\]\-\._+%\$#\=~',]*)+(&[a-zA-Z0-9\[\]\-\._+%\$#\=~',]*=[a-zA-Z0-9\[\]\-\._+%\$#\=~',]*)*)?)?
Description
Based on the work of N H (http://regexlib.com/REDetails.aspx?regexp_id=96). Added ftps protocol, makes protocol optional, makes slash after site optional.
Matches
google.com | http://mysite.org:80/thispage.asp | ftp://ftp.upload.com/
Non-Matches
nomatchcom
Author Rating: The rating for this expression. Brad Williams
Title Test Details Password Verification
Expression
^(?=.*\d)(?=.*[A-Za-z])(?!.*[!@#\$%\^&\*\(\)\+=\|;'"{}<>\.\?\-_\\/:,~`]).{6,20}$
Description
Validates passwords to be 6-20 characters of letter and numbers and NO special characters (that appear on the keyboard). Adjust numbers at the end and remove special characters as needed.
Matches
abc123 | 8e9272wi8 | WEF896wdfso
Non-Matches
iD0notM@tch | n3itherDO_!
Author Rating: Not yet rated. Brad Williams
Title Test Details Groups
Expression
\?<.+?>
Description
Matches the name portion of a named group. Useful for "cleaning" regular expressions for use with ASP controls (since they don't support named groups).
Matches
(?<myname>[a-zA-Z])
Non-Matches
([a-zA-Z])
Author Rating: Not yet rated. Brad Williams
Title Test Details Email
Expression
(?<username>#?[_a-zA-Z0-9+-]+(\.[_a-zA-Z0-9+-]+)*)@(?<domain>[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name)))
Description
Matches valid emails. Suggestions welcome.
Matches
my.address@domain.com | gmail+junkfilter@gmail.com | abc123@dont_email_me.com
Non-Matches
myINV@LIDemail@poof.com | badDomain@a.com
Author Rating: Not yet rated. Brad Williams
Title Test Details US 10-digit Phone Number
Expression
\(?(?<areacode>[1]?[2-9]\d{2})\)?[\s-]?(?<prefix>[2-9]\d{2})[\s-]?(?<linenumber>[\d]{4})
Description
Matches VALID 10 digit US phone numbers. Formatting characters are optional. Valid area codes and prefixes never begin with 0 or 1.
Matches
9875551212 | (987) 555-1212 | 987-555-1212
Non-Matches
1234567890 | 987-123-5555
Author Rating: Not yet rated. Brad Williams
Title Test Details Canadian Postal Code
Expression
^(?![DFIOQU])([ABCEGHJ-NPRSTVXY]\d[A-Z][ ]\d[A-Z]\d)$
Description
Validates Canadian postal codes. Format: A9A 9A9 Cannot contain: DFIOQU First letter must be one of: ABCEGHJKLMNPRSTVXY
Matches
A9A 9A9 | T3P 6N1
Non-Matches
D9U 1O5
Author Rating: Not yet rated. Brad Williams
   Displaying page 1 of 1 pages; Items 1 to 9

Copyright © 2001-2009, RegexAdvice.com | ASP.NET Tutorials