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

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 4038 regular expressions found.

Change page:   |    Displaying page 27 of 41 pages; Items 2601 to 2700
Title Test Details Relocating Services To get Good way Moves
Expression
Packers and Movers
Description
Packers and Movers Pune @ http://www.top5th.co.in/packers-and-movers-pune/ Packers and Movers Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ ong distance heading can be be extremely tense, not alone because you can be getting into a brand new lifetime everywhere else, and because you need to carry lots of your way of life in another place with you, therefore generally provides a really number of home furnishings and even kitchen appliances which for reasons uknown may not be left out. The good news is, shifting offerings with regard to long distance movements are readily available to make a shift like emotional tension free as they can, so you can give attention to just about all the rest of the stressors involving switching residence along with dwelling! You already know this collectible dresser that's within your friends and family to get generations? You not surprisingly can't just get rid of it, but concurrently it does take upward a lot of space or room that you can get without the need of getting you to definitely allow. Good way movers can be there to check you can preserve what you may intend, along with being considerably more cost effective to advance stuff everyone have already got than to locate cool people. This getting a good way heading service is expensive but also from actuality it is very cheap, and additionally doesn't cost far more as compared to choosing your vehicle they are driving yourself, which are often complicated together with burdensome. Generating your vehicle all by yourself can even be dangerous! But if the brakes go out over the uhaul if you end up meeting accelerate within mountainous aspects also, you never discover how to overcome the situation... you are in significant a tough time! Specialized pickup truck operators will have learned to take action at once together with efficiently to your circumstances. Packers and Movers Noida @ http://www.top5th.co.in/packers-and-movers-noida/ Packers and Movers Gurgaon @ http://www.top5th.co.in/packers-and-movers-gurgaon/
Matches
Packers and Movers
Non-Matches
top5th
Author Rating: Not yet rated. Uttam Singh
Title Test Details Going together with Storage space Would make Moving Better
Expression
Packers and Movers
Description
Packers and Movers Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Packers and Movers in Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Every time you transfer, there are actually merged thoughts with thrills together with issue, thrills across going for an innovative position together with assembly innovative most people together with issue above the protection skin color items that you need to take together with you. It's in which a going together with storage space product can be purchased in. Taking everything one self together with providing together with unpacking end up more and more challenging, especially when your task usually requires want you to switch consistently. Additionally, as soon as you transfer to an alternative property, it's probably may possibly not necessarily see immediate breathing space for all you items. It's and you should think about reserving do it yourself storage space complexes. Additionally, you may employ an email finder service which often won't just assist you wrap together with switch, and furnish going storage space. It usually is advisable pick a corporation which gives most of the needed solutions within a position rather then decide on do it yourself storage space warehouses independently. Stocking Together with Going Blend When you have been looking to remain ones items protected whilst you're gone for an longer excursion and require breathing space for any items you've got produced to an innovative property and then an innovative town, some sort of going together with storage space product will assist you to. You may not necessarily give ones home furnishings together with items alone whenever you set off on a journey and switch. Appointing some sort of going storage space product is a good selection in such a case. As soon as you get hold of some sort of going corporation, ensure you inquire if they supply a storage space center and not necessarily. In many cases, that movers may offer accommodation self storage, additionally. The following would make items better. In the case that going product you've got preferred fails to make available its very own versions, test an additional corporation. It usually is advisable get almost everything with an individual position. Choosing the right Going Together with Stocking Corporation Even though going together with storage space agencies get items better, it can be vital that you really discover a product which often is a good fitted to people with regard to prerequisites together with spending plan and it is respected together with good quality. The following gets to be certainly fundamental if you're wanting to switch together with retail store costly product, autos and fundamental docs. *Make sure that product is usually good quality, contains an adequate real bodily office environment home address, an operational contact number together with a great e-mail home address. *Always choose a product which often fails to stop approximately spreading recommendations. Good quality corporation may be a lot more than content with discuss that recommendations with clients who've been content with it's solutions. Make certain that going together with storage space product you have been looking inside comes with recommendations to share with you. Speak with a variety of them. *Check that product is usually registered together with permitted per most of the needed authorized together with specialists. *Every superior product will possess a well known internet occurrence. Test send out internet site, feedback together with info in advance of finalizing the idea. *Try choosing to get a going together with storage space product that provides superior bang for your buck. It's certainly fundamental if you're for a spending plan. You will still have the money, it usually is superior for any successful come to terms. Movers and Packers Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Movers and Packers in Delhi @
Matches
Packers and Movers
Non-Matches
top5th
Author Rating: Not yet rated. Uttam Singh
Title Test Details Going together with Storage space Would make Moving Better
Expression
Packers and Movers
Description
Packers and Movers Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Packers and Movers in Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Every time you transfer, there are actually merged thoughts with thrills together with issue, thrills across going for an innovative position together with assembly innovative most people together with issue above the protection skin color items that you need to take together with you. It's in which a going together with storage space product can be purchased in. Taking everything one self together with providing together with unpacking end up more and more challenging, especially when your task usually requires want you to switch consistently. Additionally, as soon as you transfer to an alternative property, it's probably may possibly not necessarily see immediate breathing space for all you items. It's and you should think about reserving do it yourself storage space complexes. Additionally, you may employ an email finder service which often won't just assist you wrap together with switch, and furnish going storage space. It usually is advisable pick a corporation which gives most of the needed solutions within a position rather then decide on do it yourself storage space warehouses independently. Stocking Together with Going Blend When you have been looking to remain ones items protected whilst you're gone for an longer excursion and require breathing space for any items you've got produced to an innovative property and then an innovative town, some sort of going together with storage space product will assist you to. You may not necessarily give ones home furnishings together with items alone whenever you set off on a journey and switch. Appointing some sort of going storage space product is a good selection in such a case. As soon as you get hold of some sort of going corporation, ensure you inquire if they supply a storage space center and not necessarily. In many cases, that movers may offer accommodation self storage, additionally. The following would make items better. In the case that going product you've got preferred fails to make available its very own versions, test an additional corporation. It usually is advisable get almost everything with an individual position. Choosing the right Going Together with Stocking Corporation Even though going together with storage space agencies get items better, it can be vital that you really discover a product which often is a good fitted to people with regard to prerequisites together with spending plan and it is respected together with good quality. The following gets to be certainly fundamental if you're wanting to switch together with retail store costly product, autos and fundamental docs. *Make sure that product is usually good quality, contains an adequate real bodily office environment home address, an operational contact number together with a great e-mail home address. *Always choose a product which often fails to stop approximately spreading recommendations. Good quality corporation may be a lot more than content with discuss that recommendations with clients who've been content with it's solutions. Make certain that going together with storage space product you have been looking inside comes with recommendations to share with you. Speak with a variety of them. *Check that product is usually registered together with permitted per most of the needed authorized together with specialists. *Every superior product will possess a well known internet occurrence. Test send out internet site, feedback together with info in advance of finalizing the idea. *Try choosing to get a going together with storage space product that provides superior bang for your buck. It's certainly fundamental if you're for a spending plan. You will still have the money, it usually is superior for any successful come to terms. Movers and Packers Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/ Movers and Packers in Delhi @ http://www.top5th.co.in/packers-and-movers-delhi/
Matches
Packers and Movers
Non-Matches
top5th
Author Rating: Not yet rated. Uttam Singh
Title Test Details Pattern Title
Expression
(.)\1{2,}
Description
matches any string with characters repeated more than twice, sometimes used as fake input
Matches
aaaeee | ???????? | gooogle
Non-Matches
google | booboo
Author Rating: Not yet rated. Bernard Martin-Rabaud
Title Test Details Capture bgcolor attribute for replacing with style attribute
Expression
<.*\b(bgcolor\s*=\s*[\"|\']*(\#\w{6})[\"|\']*).*>
Description
Variable 1 = "complete attribute and value". Variable 2 = "attribute value only". For meeting compliance with W3C AA rules, I've been using this in a simple HTML parser to convert certain background tags from the deprecated 'bgcolor' attribute to now using a 'style=background:' and the passed colour. This had to be only on hexadecimal values for my current needs. Later modifications : 1. Only for certain tags (eg. td,tr,table). 2. If matching an opening apostrophe/quotation mark, only capture variable if there is a closing one.
Matches
table bgcolor="#A3A3A3" | table bgcolor= #A3A3A3" | td bgcolor= #A3A3A3 | td bgcolor=#A3A3A3 alt="somethingelse"
Non-Matches
tr bgcolor="" test | tablebgcolor="#A3A3A3" | table bgcolor="test2" | td bgcolor="red" | td bgcolor="#$%skis"
Author Rating: The rating for this expression. Tom Meier
Title Test Details Tags
Expression
(< *balise[ *>|:(.|\n)*>| (.|\n)*>](.|\n)*</balise *>)
Description
retrieve any tag and its content
Matches
<balise>toto</balise>
Non-Matches
<balise>toto
Author Rating: The rating for this expression. ggggg
Title Test Details sip and sips
Expression
^(sip|sips)\:\+?([\w|\:?\.?\-?\@?\;?\,?\=\%\&]+)
Description
The sip/sips syntax is from http://www.ietf.org/rfc/rfc3261.txt?number=3261, seems the pattern works fine, but I worry about the performance
Matches
sip:alice@atlanta.com | sip:alice:secretword@atlanta.com;transport=tcp | sips:alice@atlanta.com?subject=project%20x&priority=urgent | sip:+1-212-555-1212:1234@gateway.com;user=phone | sips:1212@gateway.com | sip:alice@192.0.2.4 | sip:atlanta.com;method=REGISTER?to=alice%40atlanta.com | sip:alice;day=tuesday@atlanta.com
Non-Matches
alice@atlanta.com | alice:secretword@atlanta.com;transport=tcp | alice@atlanta.com?subject=project%20x&priority=urgent | +1-212-555-1212:1234@gateway.com;user=phone | 1212@gateway.com | alice@192.0.2.4 | atlanta.com;method=REGISTER?to=alice%40atlanta.com | alice;day=tuesday@atlanta.com
Author Rating: Not yet rated. bacon
Title Test Details Location cordinates
Expression
[NS] \d{1,}(\:[0-5]\d){2}.{0,1}\d{0,},[EW] \d{1,}(\:[0-5]\d){2}.{0,1}\d{0,}
Description
Latitude and longitude coordinates separated by a comma in the form: N 0:59:59.99,E 0:59:59.99 No restriction on degrees. Use split on comma to separate Latitude and Longitude then on colon and space for parts to convert into a decimal value.
Matches
N 50:54:44.99,W 4:59:11.0; N 38:55:02.90,W 76:59:31.19; N 22:16:42,E 114:09:32
Non-Matches
N 22:66:61,E 85:00:33; E 00:00:00.00,N 00:00:00.00; N00:00:00.00, E00:00:00.00
Author Rating: Not yet rated. binder hamlyn
Title Test Details match csharp string
Expression
".*?[^"\\]"(?!")|""
Description
match the csharp string Syntax
Matches
"C#" | "My Club Site tag"",""line or slogan"
Non-Matches
C#"
Author Rating: Not yet rated. JifengHuang
Title Test Details match 2 or 3 string parameters csharp method
Expression
\(\s*@*(".*?[^"\\]"(?!")||"")\s*,\s*@*(".*?[^"\\]"(?!")|"")\s*(?:\)|(?:,\s*@*(".*?[^"\\]"(?!")||"")\s*))?\)
Description
match chsarp method with 2 or 3 string parameters syntax
Matches
("a","b") | ("a","b","c")
Non-Matches
("a") | ("a","b","c","d")
Author Rating: Not yet rated. JifengHuang
Title Test Details Divisibility by 3
Expression
((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*)|((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*[147][^147]*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*[258][^258]*)|((?=[^147]*([147][^147]*[147][^147]*[147][^147]*)*[147][^147]*[147][^147]*$)[^258]*([258][^258]*[258][^258]*[258][^258]*)*[258][^258]*[258][^258]*)
Description
Matches decimal numbers that are divisible by 3. :-)
Matches
18|999|176826
Non-Matches
19|998|176827
Author Rating: Not yet rated. Hans-Peter Störr
Title Test Details Scripture
Expression
([1-3]{0,1}\n{0,1}\s{0,1}\n{0,1}[a-zA-Z]+\s{1}\n{0,1}\d{1,2}:{1}\s{0,1}\d{1,2}){1}(,{1}\n{0,1}\s{0,1}\d{1,2}({1}\s{0,9}\n{0,1}\d{1,2}){0,9}){0,9}(-{1}\s{0,1}\n{0,1}\d{1,2}){0,9}(,{1}\s{0,1}\d{1,2}){0,9}(;\s{0,1}\n{0,1}\d{1,2}\s{0,1}:{1}\s{0,1}\d{1,2}(-{1}\s{0,9}\n{0,1}\d{1,2}){0,9}(,{1}\s{0,9}\d{1,2}(-{1}\s{0,9}\n{0,1}\d{1,2}){0,9}){0,9}){0,9}
Description
Bibe Books, Chapters and versus.
Matches
1 John 4:8; Psalm 37:11
Non-Matches
This is non-matching text.
Author Rating: Not yet rated. Jamie Scott
Title Test Details ISO Date Format
Expression
^(\d{4})\D?(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])(\D?([01]\d|2[0-3])\D?([0-5]\d)\D?([0-5]\d)?)?$
Description
Regex to match the ISO Date Format. The time part is optional, including the seconds, as are all of the delimiters (although they must be non-numeric). Each part of the date will be returned as a selection e.g. \1 will contain the Year, \2 will contain the Month.
Matches
2006-12-31 17:58:00 | 20061231175800 | 2006-12-31
Non-Matches
2006-13-36 25:61:62
Author Rating: The rating for this expression. Paul Ward
Title Test Details http://brainfireadvice.com/vinetics-c-eye-serum/
Expression
http://brainfireadvice.com/vinetics-c-eye-serum/
Description
Vinetics C Eye Serum Every woman with oily skin understands the significance of controlling oil buildup which has a greasy look by refining your body. Tighten your pores and help control oily skin buy using either of this following budget brand skin care products. http://brainfireadvice.com/vinetics-c-eye-serum/
Matches
http://brainfireadvice.com/vinetics-c-eye-serum/
Non-Matches
http://brainfireadvice.com/vinetics-c-eye-serum/
Author Rating: Not yet rated. akel elis
Title Test Details Currency
Expression
^((\d{1,3}((,\d{3})*|\d*)(\.{0,1})\d+)|\d+)$
Description
match US currency
Matches
most
Non-Matches
not known
Author Rating: Not yet rated. mp09
Title Test Details Pattern Title
Expression
(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(\d{4}))|((29)(\.|-|\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26])))
Description
Date in DD/MM/YYYY format. Fecha en formato DD/MM/AAAA.
Matches
28/12/2003 | 28/02/2003 | 29/02/2000
Non-Matches
28-02-2003 | 30/02/2003 | 28.02.2003
Author Rating: Not yet rated. Mathews Inga
Title Test Details US Phone Number w/ ext.
Expression
^([+]?\d{1,4})?([\s-.+]?\(?\d{3}\)?)?([\s-.]?\d{3})([\s-.]?\d{4})\s?([eE]?[xX]?[tT]?[\s-.:]?\s?\d{4})?
Description
US phone regex which allows the country code prefix and extension suffix
Matches
1-123-456-7890 ext.1234, +1 (123) 456-7890 x: 1234, 1234567890 EXT 1234
Non-Matches
1 (123) 456-7890 m: 1234, +123456-123-456-7890 T: 12356
Author Rating: Not yet rated. Kennethnume
Title Test Details Generic Viagra | impressive remedy online for men
Expression
Health
Description
Men who have lost plan to have the delights of sensual life procure it again with Generic Viagra http://www.genericapharmacy.net/. It is an awesome chance to taste all the appeal of a close relationship over and over.So Buy Generic Viagra Online is nice one solution.
Matches
Generic Viagra, Generic Viagra Online
Non-Matches
Non specific
Author Rating: The rating for this expression. Robert Walker
Title Test Details Pattern Title
Expression
&lt;(?:[^&quot;']+?|.+?(?:&quot;|').*?(?:&quot;|')?.*?)*?&gt;
Description
This will match all tags in a string, it's good for stripping HTML or XML tags to get the plain text.It works with attributes that include javascript or &quot;&lt;&gt;&quot;. It will match all these &lt;hr size=&quot;3&quot; noshade color=&quot;#000000&quot; align=&quot;left&quot;&gt; &lt;p style=&quot;margin-top:0px;margin-bottom:0px&quot; align=&quot;center&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;5&quot;&gt;&lt;b&gt;UNITED STATES&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;input type=button onclick='if(n.value&gt;5)do_this();'&gt; not this &lt;br&gt; &lt;input type=button onclick=&quot;n&gt;5?a():b();&quot; value=test&gt; not this &lt;br&gt; &lt;input type=button onclick=&quot;n&gt;5?a(\&quot;OK\&quot;):b('Not Ok');&quot; value=test&gt; not this &lt;br&gt; &lt;input type=button onclick='n&gt;5' value=test onmouseover=&quot;n&lt;5&amp;&amp;n&gt;8&quot; onmouseout='if(n&gt;5)alert(\'True\');else alert(&quot;False&quot;)'&gt; not this &lt;br&gt;
Matches
&lt;input type=button onclick='n&gt;5' value=test onmouseover=&quot;n&lt;5&amp;&amp;n&gt;8&quot; onm
Non-Matches
haven't found any exceptions yet
Author Rating: The rating for this expression. Toby Henderson
Title Test Details Pattern Title
Expression
((http|ftp|https):\/\/w{3}[\d]*.|(http|ftp|https):\/\/|w{3}[\d]*.)([\w\d\._\-#\(\)\[\]\\,;:]+@[\w\d\._\-#\(\)\[\]\\,;:])?([a-z0-9]+.)*[a-z\-0-9]+.([a-z]{2,3})?[a-z]{2,6}(:[0-9]+)?(\/[\/a-z0-9\._\-,]+)*[a-z0-9\-_\.\s\%]+(\?[a-z0-9=%&amp;\.\-,#]+)?
Description
Here is my first regexp. I hope you like it! It parses quite a few different urls, although it's not a high-quality regexp. Http, Ftp protocols are supported, parameters and anchors too.
Matches
www.yahoo.com | ftp://user:pass@host.com:123 | http://localhost/page2.php?a=b&amp;c=d#hello
Non-Matches
website.net
Author Rating: The rating for this expression. Francis Marass
Title Test Details Pattern Title
Expression
0{3,}|1{3,}|2{3,}|3{3,}|4{3,}|5{3,}|6{3,}|7{3,}|8{3,}|9{3,}
Description
An expression to look for numbers that repeat 3 or more times in succession.
Matches
122234567 | 1234444444 | 12345999
Non-Matches
123456 | 1335855 | 1983464
Author Rating: The rating for this expression. Nate Man
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 Employer ID Number
Expression
^([07][1-7]|1[0-6]|2[0-7]|[35][0-9]|[468][0-8]|9[0-589])-?\d{7}$
Description
US IRS Employee ID Number, aka Federal Tax ID Number
Matches
01-1234567, 011234567
Non-Matches
00-1234567, 49-1234567, 123-45-6789
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|arpa|asia|coop|info|jobs|mobi|museum|name|travel))+(?<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. Suggestions welcome.
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|arpa|asia|coop|info|jobs|mobi|museum|name|travel))+(:[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: 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
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 (after the "(?!") as needed. Numbers appear at the END to address an IE problem with zero-width look-aheads.
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\.])*?[a-zA-Z0-9]+\.([0-9]{1,3}|[a-zA-Z]{2,3}|(aero|arpa|asia|coop|info|jobs|mobi|museum|name|travel)))
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: The rating for this expression. Brad Williams
Title Test Details HtmlAmpCode
Expression
((&#[0-9]+|&[a-zA-Z]+[0-9]*?);)
Description
Matches HTML 'amp' codes
Matches
&reg; | &nbsp; | &#32;
Non-Matches
&32;
Author Rating: Not yet rated. Brad Williams
Title Test Details Latitude (decimal)
Expression
^-?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
Description
[-90.000000 ... 90.000000] Decimal places: up to 6. You can increase precision by replacing {1,6} with {1,your_number}
Matches
-90; -90.0; -89.99; 0; 0.000; 89.99; 90.0; 90
Non-Matches
-100; -90.1; 90.01; 100
Author Rating: Not yet rated. Zygimantas Berziunas
Title Test Details Longitude (decimal)
Expression
^-?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[1-7][0-9])(?:(?:\.[0-9]{1,6})?))$
Description
[-180.000000 ... 180.000000] Decimal places: up to 6. You can increase precision by replacing {1,6} with {1,your_number}
Matches
-180; -180.0; -179.99; 0.000; 179.99; 180.0; 180
Non-Matches
-200; -180.1; 180.1; 200
Author Rating: Not yet rated. Zygimantas Berziunas
Title Test Details http://nutrahealthtrimsite.com/t-volve/
Expression
hurting the rebuilding process. Specialists are encouraging why right now to drink enough water to gain muscle!
Description
T Volve When you drink, you pee. That is the nature of diuretics. Situation is a person simply will be dehydrated. Dehydration can decrease protein synthesis buy nearly 20%. You spent precisely what time globe gym but now you're hurting the rebuilding process. Specialists are encouraging why right now to drink enough water to gain muscle! http://nutrahealthtrimsite.com/t-volve/
Matches
dgfg
Non-Matches
fgfgfg
Author Rating: Not yet rated. tehyf hdkd
Title Test Details Html Tag finder
Expression
<\s*/?\s*\w+(\s*\w+\s*=\s*(['"][^'"]*['"]|[\w#]+))*\s*/?\s*>
Description
This pattern can find any HTML tag. It supports attributes whose values may be enclosed between single or double quotes. It aslo support spaces between delimeters.
Matches
Color is &lt;font color =#880000 &gt;red &lt; / font &gt;
Non-Matches
12 is < 20 and > 6
Author Rating: Not yet rated. Ferdinando Ricchiuti
Title Test Details Pattern Title
Expression
(?<=(\n|^))(>\s*)+
Description
Substitute that regex with null to clean up emails witch got replied 1000 times and are Fed up with a lot of &gt;'s first i wanted to make a class out of (\n|^) (something like [\n^] - but that doesnt work :( )
Matches
>
Non-Matches
<
Author Rating: The rating for this expression. Dave Zeddl
Title Test Details Free Virus Removal Software
Expression
zepto-virus-removal
Description
Although you might be seeing pop ups that say something like "your computer is contaminated!" DON'T fall for the traps. Yes your system has been compromised using a virus, but this program is the perpetrator. Installing the software will only put the reason computer in further possible danger. http://www.betamortgageratecutter.com/zepto-virus-removal/
Matches
zepto-virus-removal
Non-Matches
Free Virus Removal Software
Author Rating: Not yet rated. mitchel starc
Title Test Details Continuous Spaces
Expression
(\s{1,})
Description
Matches all chars that are made up of one or more spaces. I found this useful when people were trying to make string length bypasses using consecutive spaces.
Matches
(one or more spaces)
Non-Matches
non-space
Author Rating: Not yet rated. Robert Gonzalez
Title Test Details Pattern Title
Expression
^[a-zA-Z_]{1}[a-zA-Z0-9_@$#]*$
Description
This Regex matches valid SQL identifiers, including names for Stored Procedures and the like. Note that local variables/parameters (which begin with an &quot;@&quot;) will not match this Regex, nor will temporary objects (beginning with a &quot;#&quot;), or global temporary objects (beginning with &quot;##&quot;). All other valid identifiers/variables/table names/stored procedure names/columns etc., will match. Please let me know if you find this useful or have any complaints - trash@primalblaze.com.
Matches
upApplicationReadContacts | _Application_ReadContacts | a_45$#z
Non-Matches
upApplication ReadContacts | $Application_ReadContacts | a_45%$#z
Author Rating: The rating for this expression. Geoff Williams
Title Test Details Oracle Binding Variables
Expression
(:[a-z]{1}[a-z1-9\$#_]*){1,31}
Description
This matches oracle binding variables in SQL. Not sure if it is the same with other RDBMS'
Matches
:x | :x1 | :x#2$
Non-Matches
:1x | :@x | :*ac
Author Rating: Not yet rated. Mike Willbanks
Title Test Details US Telephone
Expression
^\(?([0-9]{3})\)?[\s\.\-]*([0-9]{3})[\s\.\-]*([0-9]{4})$
Description
Basically I didn't like any of the regular expressions that were available because they all failed at parsing them into variables correctly... This regular expression gives you the full match and then the 3 sections of digits seperately.
Matches
(000) 000-0000, 0000000000, 000.000.0000
Non-Matches
000/000/0000, 00a.000.000, +000.000.0000
Author Rating: The rating for this expression. Mike Willbanks
Title Test Details Percent Expression
Expression
^\s*(\d{0,2})(\.?(\d*))?\s*\%?\s*$
Description
Basically this matches into variables for percentages.. It allows as much whitespace before and after the expression. $1 = Percent before decimal, $2 = percentage after decimal inc decimal, $3 = percentage after decimal. Disallowed anything past 99.99999 repeating percent. No negative percents either. Easy to implement but I do not need it.
Matches
10.5%, 1%, 1, .5, .0555%
Non-Matches
100%, -1%, -1, 200, 200.1
Author Rating: Not yet rated. Mike Willbanks
Title Test Details a
Expression
/^[0-9]+\.d{3}? *$/
Description
To check that maximum 3 digits it should be after decimal
Matches
12.234
Non-Matches
12.23
Author Rating: Not yet rated. Poonam Jha
Title Test Details Australian Date Format
Expression
^((((([1-9])|(0[1-9])|(1\d)|(2[0-8]))/(([1-9])|(0[1-9])|(1[0-2])))|((31/(((0[13578])|([13578]))|(1[02])))|((29|30)/(((0[1,3-9])|([1,3-9]))|(1[0-2])))))/((20[0-9][0-9]))|(((([1-9])|(0[1-9])|(1\d)|(2[0-8]))/(([1-9])|(0[1-9])|(1[0-2])))|((31/(((0[13578])|([13578]))|(1[02])))|((29|30)/(((0[1,3-9])|([1,3-9]))|(1[0-2])))))/((19[0-9][0-9]))|(29/(02|2)/20(([02468][048])|([13579][26])))|(29/(02|2)/19(([02468][048])|([13579][26]))))$
Description
Australian date format d/m/yyyy or dd/m/yyyy, d/mm/yyyy or dd/mm/yyyy. Valid dates from 1900 to 2099 including leap year.
Matches
1/2/2004, 01/2/2004, 1/02/2004, 01/02/2004, 29/2/2004, 29/02/2009
Non-Matches
1/2/04, 1/2/4
Author Rating: Not yet rated. Rino Batin
Title Test Details 01/01/1753 - 12/31/9999
Expression
^(0?[1-9]|1[0-2])\/(0?[1-9]|[1-2][0-9]|3[0-1])\/(0[1-9]|[1-9][0-9]|175[3-9]|17[6-9][0-9]|1[8-9][0-9]{2}|[2-9][0-9]{3})$
Description
Matches all dates (mm/dd/yyyy or mm/dd/yy) greater than or equal to the SQL minimum date of 01/01/1753 and less than or equal to 12/31/9999. Does not check for leap years.
Matches
01/01/1753 | 9/2/09 | 12/02/1980 | 12/31/9999
Non-Matches
1/1/1 | 13/1/01 | 01/0/2001 | 12/31/1752 | 1-1-1900
Author Rating: Not yet rated. Ecyrb
Title Test Details http://maximizedmuscleideas.com/testx-core/
Expression
dghbg
Description
muscle fibres than your isolation exercises and in addition release a larger amount of Testosterone Booster review and human growth hormone into your body. http://maximizedmuscleideas.com/testx-core/
Matches
dfgsrgd
Non-Matches
dh
Author Rating: Not yet rated. usmknkh Gree
Title Test Details http://maximizedmuscleideas.com/testx-core/
Expression
fghjnf
Description
deadlift, bent over rows, tricep dips, shoulder press, chin ups, lunges give up. These compound exercises give stress together with a greater regarding muscle fibres than your isolation exercises and in addition release a larger amount of Testosterone Booster review and human growth hormone into your body. http://maximizedmuscleideas.com/testx-core/
Matches
gfs
Non-Matches
gfdhgd
Author Rating: Not yet rated. usmknkh Gree
Title Test Details Pattern Title
Expression
^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$
Description
Email validation. With this short expression you can validate for proper email format. It's short and accurate.
Matches
bob-smith@foo.com | bob.smith@foo.com | bob_smith@foo.com
Non-Matches
-smith@foo.com | .smith@foo.com | smith@foo_com
Author Rating: Not yet rated. Eric Lebetsamer
Title Test Details Pattern Title
Expression
(^(\d{2}.\d{3}.\d{3}/\d{4}-\d{2})|(\d{14})$)|(^(\d{3}.\d{3}.\d{3}-\d{2})|(\d{11})$)
Description
Validador de CPF ou CNPJ brasileiro. Utilizado em campos que podem receber os dois valores, como um campo de busca, que pode buscar por CPF ou CNPJ, como era o meu caso. [00.000.000/0000-00], [123.456.789-98],[00000000000000] e [12345678998] Enjoy! =)
Matches
00.000.000/0000-00 | 123.456.789-98 | 12345678901234
Non-Matches
12.123.123.0001.12 | 123.456.789.89
Author Rating: The rating for this expression. Gabriel Araujo
Title Test Details Pattern Title
Expression
^([1-9]{1}[\d]{0,2}(\.[\d]{3})*(\,[\d]{0,2})?|[1-9]{1}[\d]{0,}(\,[\d]{0,2})?|0(\,[\d]{0,2})?|(\,[\d]{1,2})?)$
Description
Numera&#231;&#227;o usar para valores moeda brasileira e de outras regi&#245;es. Dinheiro, money... Enjoy! =)
Matches
123,02 | 123.456,02 | 123.456.789,02
Non-Matches
123,003 | 123,123.02
Author Rating: The rating for this expression. Gabriel Araujo
Title Test Details Arabic+Farsi+English Cleanup
Expression
^[ a - z, 0 - 9 , ? - ? ,? - ? , ? - ? ,? - ? , . ]
Description
good for cleanup none (farsi+arabic+english)letters
Matches
[a-z ا-ي ]+some special characters
Non-Matches
%$#*&^!+_-=><...
Author Rating: Not yet rated. Qasem h nobari
Title Test Details Cleanup non Alpha Numeric
Expression
[^""\?\/\&\;\:\|\”\“\(\)\[\]\=\^\.\%\$\#\!\*\?\?\»\«\×\?]
Description
Cleanup non Alpha Numeric
Matches
a-z + A-Z + 0-9 + Farsi(Arabic) support
Non-Matches
""\،\/\&\;\:\|\”\“\(\)\[\]\=\^\.\%\$\#\!\*\?\؟\»\«\×\؛
Author Rating: Not yet rated. Qasem h nobari
Title Test Details Pattern Title
Expression
^.+@[^\.].*\.[a-z]{2,}$
Description
Most email validation regexps are outdated and ignore the fact that domain names can contain any foreign character these days, as well as the fact that anything before @ is acceptable. The only roman alphabet restriction is in the TLD, which for a long time has been more than 2 or 3 chars (.museum, .aero, .info). The only dot restriction is that . cannot be placed directly after @. This pattern captures any valid, reallife email adress.
Matches
whatever@somewhere.museum | foreignchars@myforeigncharsdomain.nu | me+mysomething@mydomain.com
Non-Matches
a@b.c | me@.my.com | a@b.comFOREIGNCHAR
Author Rating: Not yet rated. Thor Larholm
Title Test Details Pattern Title
Expression
&lt;[iI][mM][gG]([^&gt;]*[^/&gt;])
Description
simple little RegExp to get the IMG tag from HTML
Matches
&lt;img src=&quot;abc.jpg&quot;&gt; | &lt;img src=&quot;abc.jpg&quot;/&gt; | &lt;ImG src=&quot;abc.j
Non-Matches
none
Author Rating: Not yet rated. Asim Goheer
Title Test Details alphanumeric with blank spaces
Expression
"^\\w*$"
Description
dakjlas
Matches
aaa 123 afdfg 790
Non-Matches
@==sd 534 klwer*
Author Rating: Not yet rated. RAKESH NAYAK
Title Test Details Anchor Href Link URL
Expression
href=(?<QUOTE>[\""\'])?(?<URL>(?<SCHEME>(file|ftp|http|https|news|nntp):\/\/|mailto\:)?(?<EMAIL>[\w-]+@)?(?<HOST>(?(SCHEME)[\w]+(\.[\w-]+)*?))(?<PATH>\/?\w*[\w-%\:\.\+\/]+)?(?<QUERY>\?[\w-%\+:\.]*(=[\w-%\+:\.]*)?(&[\w-%\+\:\.]*(=[\w-%\+:\.]*)?)*)?(?<ANCHOR>\#[\w-%\+:\.]+)?)(?<-QUOTE>[\""\'])?(?#VALIDATE QUOTES/URL)(?(PATH)|(?(SCHEME)|(?!)))(?(QUOTE)(?!))
Description
Matches href links / URLS within html and separates out the Scheme, Email, Domain, Path, Query, Anchor and the full URL. Based on Andrew Lee's version with some further tweaking.
Matches
href="mailto:text@example.com" | href="www.example.com" | href="https://localhost/bla-h3/?x%20#test1" | href='eek' | href="ftp://127.0.0.1/" | href="http://example.com/Search.aspx?k=href&c=-1&m=-1&ps=%20" | href=example.com | href="http://www.example.com/search?q=pi+day&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#sx"
Non-Matches
href="" | href= | href="javascript: testMe();" | href="bad example"
Author Rating: Not yet rated. Eric Bouwsema
Title Test Details HTML Anchor
Expression
<a (?:(?<ATTRIBUTES>[\w-]+=[\""\']?[\w\S ]+?[\""\'])[ ]+)*href=(?<QUOTE>[\""\'])?(?<URL>(?<SCHEME>(file|ftp|http|https|news|nntp):\/\/|mailto\:)?(?<EMAIL>[\w-]+@)?(?<HOST>(?(SCHEME)[\w]+(\.[\w-]+)*?))(?<PATH>\/?\w*[\w-%\:\.\+\/]+)?(?<QUERY>\?[\w-%\+:\.]*(=[\w-%\+:\.]*)?(&[\w-%\+\:\.]*(=[\w-%\+:\.]*)?)*)?(?<ANCHOR>\#[\w-%\+:\.]+)?)?(?<-QUOTE>[\""\'])?(?:[ ]+(?<ATTRIBUTES>[\w-]+=[\""\']?[\w\S ]+?[\""\']))*>(?<TEXT>.+?)<\/a>(?#VALIDATE QUOTES/URL)(?(PATH)|(?(SCHEME)|(?!)))(?(QUOTE)(?!))
Description
Will match an HTML anchor and will include attributes. It will output various named groups.
Matches
<a target="_blank" class="cssLink" href="http://www.prize-pony.com/pcomp/solarxylophone/">Rory's</a> | <a href="/products/make12xphone/parts/">Bundle Parts</a> | <a href="/products/make12xphone/parts/" target="_blank">Bundle Parts</a> | <a href="mailto:text@example.com">example</a> | <a href="http://www.example.com">example</a> | <a href="https://localhost/bla-h3/?x%20#test1">test</a> | <a href='eek' class='testMe'>eek</a> | <a class="google" href="http://example.com/Search.aspx?k=href&c=-1&m=-1&ps=%20" target="_top">Search</a> | <a href="ftp://127.0.0.1">FTP</a> | <a class="google" href="http
Non-Matches
<a href="">asdas</a> | <a href=">asda2</a> | <a href=>asda3</a> | <a href="javascript: testMe();">testMe</a> | <a href="javascript: testMe();" extraText>testMe</a> | <a href="http://www.example.com" extraText>example</a> | <a href="bad example">bad example</a>
Author Rating: Not yet rated. Eric Bouwsema
Title Test Details Non negative real number limited to 2 decimal spaces
Expression
^0$|^0\.{1}(\d{1,2})$|^[1-9]{1}[0-9]*\.?(\d{1,2})$|^[1-9]+[0-9]*$
Description
Matches any non-negative, non-signed real number with maximum of 2 decimal spaces. The decimal is denoted by a . symbol.
Matches
0.4 | 50.76 | 100 | 120.00 | 0 | 0.00
Non-Matches
+5 | .32 | 00 | 15.123 | -5 | 4.
Author Rating: Not yet rated. Marko Mijuskovic
Title Test Details Number as English text
Expression
\b(((((one|t((en)|(wo)|(hree)|(welve)|(hirteen))|(evelen)|(f((our)|(ive))|s((ix)|(even))|eight|nine)(teen)?))\b(\s+hundred\s*)?)| ((t((wen)|(hir))|f((or)|(if))|s((ix)|(even))|eigh|nin)ty)(-(one|t((wo)|(hree))|f((our)|(ive))|s((ix)|(even))|eight|nine))?) (\s*(hundred|thousand|((([mb]|(t|quad)r))illion))\s*(and\s+)?)?)+
Description
Match words in English that represent a number
Matches
sixteen million six hundred thousand two hundred forty-seven
Non-Matches
16,600,247
Author Rating: Not yet rated. Michael Ash
Title Test Details Multi-format date regex
Expression
^(?ni:(((?:((((((?<month>(?<monthname>(Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)))\ )|(?<month>(?<monthnum>(0?[13578])|10)(?<sep>[-/.])))(?<day>31)(?(monthnum)|st)?)|((((?<month>(?<monthname>Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?))\ )|((?<month>(?<monthnum>(0?[13-9])|1[012]))(?<sep>[-/.])))(?<day>((0?[1-9]|([12]\d)|30)|(?(monthname)(\b2?(1st|2nd|3rd|[4-9]th)|(2|3)0th|1\dth\b))))))|((((?<month>(?<monthname>Feb(ruary)?))\ )|((?<month>0?2)(?<sep>[-/.])))((?(monthname)(?<day>(\b2?(1st|2nd|3rd|[4-8]th)|9th|20th|1\dth\b)|(0?[1-9]|1\d|2[0-8])))|(?<day>29(?=(\k<sep>|(?(monthname)th)?,\ )((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))(?(sep)\k<sep>|((?(monthname)th)?,\ ))(?<year>(1[6-9]|[2-9]\d)\d{2}))$|((?<days>(31(?<suffix>st)?(?!(\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\b|t)t?|Nov)(ember)?))|[-/.](0?[2469]|11)))|((30|29)(?<suffix>th)?(?!((\ Feb(ruary)?)|([-/.]0?2))))|(29(?<suffix>th)?(?=((\ Feb(ruary)?\ )|([ -/.]0?2))(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(?<suffix>(?=\d\d?[nrst][dht]\ [JFMASOND])(\b2?(1st|2nd|3rd|[4-8]th)|20th|1\dth\b)|((0?[1-9])|1\d|2[0-8])))(?<month>(\ (?<monthname>(Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\b|t)t?|Nov|Dec)(ember)?))\ )|(?(\k<suffix>)|((?<sep>[-/.])(0?[1-9]|1[012])\k<sep>)))(?<year>(1[6-9]|[2-9]\d)\d{2}))|\b((?<year>((1[6-9])|([2-9]\d))\d\d)(?<sep>[/.-])(?<month>0?[1-9]|1[012])\k<sep>(?<day>((?<!(\k<sep>((0?[2469])|11)\k<sep>))31)|(?<!\k<sep>(0?2)\k<sep>)(29|30)|((?<=((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00)\k<sep>(0?2)\k<sep>)29)|((0?[1-9])|(1\d)|(2[0-8]))))\b)(?:(?=\x20\d)\x20|$))?((?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2}))?)$
Description
Another date regex. From year 1600-9999, days in month and leap year checks. Formats include MM-dd-YYYY, dd-MM-yyyy, yyyy-MM-dd, MMM dd,yyyy or dd MMM yyyy. Years are always four digits, months can be one or two digits, three letter abbreivation or full name. Named months (non-digit) can have days with a suffix 1st, 2nd, etc. Numeric months must have a separtate between itself and the other date parts. For Demo only: This was just a mental exercise don't use this for actual validation. Used .Net regex engines advanced features for easier constuction. Use this website (or .net engine) to test.
Matches
1/1/1600 | Jan 30th, 1902 | 29-02-2004 | 2000-31-12 | 5 PM
Non-Matches
12-32-2000 | 2/29/1999
Author Rating: Not yet rated. Michael Ash
Title Test Details ISBNs
Expression
ISBN(-1(?:(0)|3))?:?\x20+(?(1)(?(2)(?:(?=.{13}$)\d{1,5}([ -])\d{1,7}\3\d{1,6}\3(?:\d|x)$)|(?:(?=.{17}$)97(?:8|9)([ -])\d{1,5}\4\d{1,7}\4\d{1,6}\4\d$))|(?(.{13}$)(?:\d{1,5}([ -])\d{1,7}\5\d{1,6}\5(?:\d|x)$)|(?:(?=.{17}$)97(?:8|9)([ -])\d{1,5}\6\d{1,7}\6\d{1,6}\6\d$)))
Description
This regex match both the old 10 digit ISBNs and the new 13 digit ISBNs. The ISBN number must be prefixed by the literal text "ISBN:" or "ISBN-10:" or "ISBN-13:". The colon is optional. Naturally an ISBN prefixed by "ISBN-10" must be a 10 digit ISBN. One prefixed by "ISBN-13" must be 13 digits. If prefixed only by "ISBN:" it can be either 10 or 13 digits. This does not evaluate whether the check digit is valid for the given ISBN. The structure of an ISBN is discribed here http://www.isbn.org/standards/home/isbn/international/html/usm4.htm (this is for 10 digit)
Matches
ISBN-13: 978-1-4028-9462-6
Non-Matches
ISBN: 1284233-2-1-1
Author Rating: Not yet rated. Michael Ash
Title Test Details ISBN-13
Expression
ISBN(?:-13)?:?\x20*(?=.{17}$)97(?:8|9)([ -])\d{1,5}\1\d{1,7}\1\d{1,6}\1\d$
Description
This regex matches the new 13 digit ISBN. The ISBN number must be preceded by the text "ISBN:" or "ISBN-13:" , the colon is optional. The proper lengthes of the ISBN elements is checked. The is no check for the validity of the check digit.
Matches
ISBN-13: 978-1-4028-9462-6
Non-Matches
ISBN-10: 1-4028-9462-7
Author Rating: Not yet rated. Michael Ash
Title Test Details yy/mm/dd Date
Expression
^(?:(?:(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\/|-|\.)(?:0?2\1(?:29)))|(?:(?:(?:1[6-9]|[2-9]\d)?\d{2})(\/|-|\.)(?:(?:(?:0?[13578]|1[02])\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\2(?:0?[1-9]|1\d|2[0-8]))))$
Description
This expression validates dates in the y/m/d format from 1600/1/1 - 9999/12/31. Follows the same validation rules for dates as my other date validator (m/d/y format) located in this library.
Matches
04/2/29 | 2002-4-30 | 02.10.31
Non-Matches
2003/2/29 | 02.4.31 | 00/00/00
Author Rating: The rating for this expression. Michael Ash
Title Test Details Text Extension
Expression
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$
Description
This RE validates a path/file of type txt (text file) This RE can be used as a filter on certain file types, while insuring the entire string is a fully qualified path and file. The filter value can be changed or added to as you need
Matches
c:\file.txt | c:\folder\sub folder\file.txt | \\network\folder\file.txt
Non-Matches
C: | C:\file.xls | folder.txt
Author Rating: Not yet rated. Michael Ash
Title Test Details Roman numerials
Expression
^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$
Description
This RE validates alpha characters that evaluate to Roman numerials, ranging from 1(I) - 3999(MMMCMXCIX). Not case sensitive.
Matches
III | xiv | MCMXCIX
Non-Matches
iiV | MCCM | XXXX
Author Rating: Not yet rated. Michael Ash
Title Test Details US currency
Expression
^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$
Description
This re matches US currency format with lead dollar sign. Dollar value must have at least one digit and may or may not be comma separated. Cents value is optional.
Matches
$0.84 | $123458 | $1,234,567.89
Non-Matches
$12,3456.01 | 12345 | $1.234
Author Rating: The rating for this expression. Michael Ash
Title Test Details M/d/y Date
Expression
^(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[13-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
Description
This expression validates dates in the US m/d/y format from 1/1/1600 - 12/31/9999.
Matches
01.1.02 | 11-30-2001 | 2/29/2000
Non-Matches
02/29/01 | 13/01/2002 | 11/00/02
Author Rating: Not yet rated. Michael Ash
Title Test Details DateTime M/d/y hh:mm:ss
Expression
^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$
Description
DateTime Validator.
Matches
12/25/2003 | 08:03:31 | 02/29/2004 12 AM
Non-Matches
02/29/2003 1:34 PM | 13:23 PM | 24:00:00
Author Rating: The rating for this expression. Michael Ash
Title Test Details Time
Expression
^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$
Description
This RE validates times patterns.
Matches
1 AM | 23:00:00 | 5:29:59 PM
Non-Matches
13 PM | 13:60:00 | 00:00:00 AM
Author Rating: The rating for this expression. Michael Ash
Title Test Details MMM dd, yyyy Date
Expression
^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\ (0?[1-9]|([12]\d)|30))|(Feb(ruary)?\ (0?[1-9]|1\d|2[0-8]|(29(?=,\ ((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\,\ ((1[6-9]|[2-9]\d)\d{2}))
Description
This RE validate Dates in the MMM dd, yyyy format from Jan 1, 1600 to Dec 31, 9999. The format is as follows: The name or 3 letter abbreivation, without a period, of the month, then a space then the day value then a comma then a space finally the year. The correct number of day are validated for each month include leap years. The name of month is case sensitive.
Matches
Jan 1, 2003 | February 29, 2004 | November 02, 3202
Non-Matches
Feb 29, 2003 | Apr 31, 1978 | jan 33,3333
Author Rating: Not yet rated. Michael Ash
Title Test Details dd MMM yyyy Date
Expression
^((31(?!\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\b|t)t?|Nov)(ember)?)))|((30|29)(?!\ Feb(ruary)?))|(29(?=\ Feb(ruary)?\ (((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))|(0?[1-9])|1\d|2[0-8])\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\b|t)t?|Nov|Dec)(ember)?)\ ((1[6-9]|[2-9]\d)\d{2})$
Description
This RE validates dates in the dd MMM yyyy format. Spaces separate the values.
Matches
31 January 2003 | 29 March 2004 | 29 Feb 2008
Non-Matches
Jan 1 2003 | 31 Sept 2003 | 29 February 2003
Author Rating: The rating for this expression. Michael Ash
Title Test Details Months
Expression
^(?:J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept|Nov|Dec)em)|Octo)ber)$
Description
This RE validate the full name of the months.
Matches
January | May | October
Non-Matches
Jan | Septem | Octo
Author Rating: The rating for this expression. Michael Ash
Title Test Details Days of the week
Expression
^(Sun|Mon|(T(ues|hurs))|Fri)(day|\.)?$|Wed(\.|nesday)?$|Sat(\.|urday)?$|T((ue?)|(hu?r?))\.?$
Description
This RE matches Days of the week or their abbreviations.
Matches
Sunday | Mon | Tu
Non-Matches
day | Wedday | Payday
Author Rating: Not yet rated. Michael Ash
Title Test Details ISBN-10
Expression
ISBN\x20(?=.{13}$)\d{1,5}([- ])\d{1,7}\1\d{1,6}\1(\d|X)$
Description
This RE validates the format of an ISBN number
Matches
ISBN 0 93028 923 4 | ISBN 1-56389-668-0 | ISBN 1-56389-016-X
Non-Matches
123456789X | ISBN 9-87654321-2 | ISBN 123 456-789X
Author Rating: Not yet rated. Michael Ash
Title Test Details State Codes
Expression
^(?-i:A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$
Description
The RE match U.S. state abbreviation used by the U.S. Post Office.
Matches
AL | CA | AA
Non-Matches
New York | California | ny
Author Rating: The rating for this expression. Michael Ash
Title Test Details U.S. Street Address
Expression
^(?n:(?<address1>(\d{1,5}(\ 1\/[234])?(\x20[A-Z]([a-z])+)+ )|(P\.O\.\ Box\ \d{1,5}))\s{1,2}(?i:(?<address2>(((APT|B LDG|DEPT|FL|HNGR|LOT|PIER|RM|S(LIP|PC|T(E|OP))|TRLR|UNIT)\x20\w{1,5})|(BSMT|FRNT|LBBY|LOWR|OFC|PH|REAR|SIDE|UPPR)\.?)\s{1,2})?)(?<city>[A-Z]([a-z])+(\.?)(\x20[A-Z]([a-z])+){0,2})\, \x20(?<state>A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADL N]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD] |T[NX]|UT|V[AIT]|W[AIVY])\x20(?<zipcode>(?!0{5})\d{5}(-\d {4})?))$
Description
captures US street address. Address format: ##### Street 2ndunit City, ST zip+4 address1 - must have street number and proper case street name. no punctuation or P.O Box #### punctuation manditory for P.O. address2 - optional secondary unit abbr. Secondary range required for some units. City - Proper case city name. State - State abbreviation. All caps zip - zip+4. Can't be all zeroes Abbreviations for secondary units and States are those used by the US Postal Service. http://www.usps.com/ncsc/lookups/usps_abbreviations.html Certain secondary units require a secondary range, see the above link THis RE isn't unbreakable, Probably will allow some false positives but should work for most addresses.
Matches
123 Park Ave Apt 123 New York City, NY 10002 | P.O. Box 12345 Los Angeles, CA 12304
Non-Matches
123 Main St | 123 City, State 00000 | 123 street city, ST 00000
Author Rating: Not yet rated. Michael Ash
Title Test Details XML Tag
Expression
<(\w+)(\s(\w*=".*?")?)*((/>)|((/*?)>.*?</\1>))
Description
This RE will match XML tag elements. All elements must be closed. Won't match nested tags
Matches
&lt;body&gt; text&lt;br/&gt;More Text &lt;/body&gt; | &lt;a href=&quot;link.html&quot;&gt;Link&lt;/a
Non-Matches
&lt;p&gt; Some Text &lt;p&gt; | &lt;hr&gt; | &lt;html&gt;
Author Rating: The rating for this expression. Michael Ash
Title Test Details mm/dd/yyyy hh:MM:ss AM/PM DateTime
Expression
(?n:^(?=\d)((?<month>(0?[13578])|1[02]|(0?[469]|11)(?!.31)|0?2(?(.29)(?=.29.((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|(?!.3[01])))(?<sep>[-./])(?<day>0?[1-9]|[12]\d|3[01])\k<sep>(?<year>(1[6-9]|[2-9]\d)\d{2})(?(?=\x20\d)\x20|$))?(?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(?i:\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$)
Description
New DateTime Regex. Rebuilt better than before, better, stronger, faster.
Matches
1/31/2002 10 AM | 2/29/2004 | 4:15:04 PM
Non-Matches
2/29/2003 | 12/32/2003 | 4:00
Author Rating: The rating for this expression. Michael Ash
Title Test Details dd/mm/yyyy hh:MM:ss Datetime
Expression
(?n:^(?=\d)((?<day>31(?!(.0?[2469]|11))|30(?!.0?2)|29(?(.0?2)(?=.{3,4}(1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|0?[1-9]|1\d|2[0-8])(?<sep>[/.-])(?<month>0?[1-9]|1[012])\2(?<year>(1[6-9]|[2-9]\d)\d{2})(?:(?=\x20\d)\x20|$))?(?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(?i:\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$)
Description
DD/MM/YYYY format New DateTime Regex. Rebuilt better than before, better, stronger, faster. This regex will validate a date, time or a datetime. It will also capture the date fields and the time. Dates are in the DD/MM/YYYY format and validated for months, number of days in a month and leap years (29/2) Date field can be separated by matched periods(.), dashes(-) or forward slashes(/). Year range 1600-9999 Time is either 12 hour AM/PM format (HH:mm:ss AM), where minutes and seconds are optional. AM or PM required. or 24 hour military format (HH:mm:SS), from 00:00:00 to 23:59:59, where hours and minutes fields are required, including leading 0 for hours less than 10. Datetime is the above date and time formats separated by a space, with the date first (DD/MM/YYYY HH:mm:SS) !IMPORTANT NOTE: your regex engine must support lookaheads and named groups to use this expression
Matches
31/12/2003 | 29/2/2004 4:50 PM | 23:59:59
Non-Matches
12/31/2003 | 29/2/2003 | 4:00
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^(?n:(?<lastname>(St\.\ )?(?-i:[A-Z]\'?\w+?\-?)+)(?<suffix>\ (?i:([JS]R)|((X(X{1,2})?)?((I((I{1,2})|V|X)?)|(V(I{0,3})))?)))?,((?<prefix>Dr|Prof|M(r?|(is)?)s)\ )?(?<firstname>(?-i:[A-Z]\'?(\w+?|\.)\ ??){1,2})?(\ (?<mname>(?-i:[A-Z])(\'?\w+?|\.))){0,2})$
Description
This pattern captures &lt;lastname&gt;&lt;suffix&gt;,&lt;prefix&gt;&lt;firstname&gt;&lt;mname&gt; Names must start with a capital letter. Last names may be hyphenated. First names can have two parts ie &quot;Mary Anne&quot; if there are more than two names after the comma. Suffixes can number up to XXX (30th). Standard prefixes are optional (Mr Miss)
Matches
O'Brien, Miles | McDonald,Mary Ann Alison | Windsor-Smith,Barry
Non-Matches
jones, john
Author Rating: The rating for this expression. Michael Ash
Title Test Details Currency
Expression
^(?!\u00a2) #Don't allow cent symbol \p{Sc}? #optional unicode currency symbols (?!0,?\d) #don't allow leading zero if 1 or more unit (\d{1,3} # 1 to 3 digits (\,\d{3})* # if the is a comma it must be followed by 3 digits |(\d+)) # more than 3 digit with no comma separator (\.\d{2})?$ # option cents
Description
This regex validates Currency. The base monetary unit (ex. US dollar) followed by option two digit cent denomination. Base unit can't have leading zero. Comma's are optional on base units. Note: Your regex engine must support the \p character class to use this. For example this will work in .net but not javascript which doesn't support \p Also the &#162; is removed from the match by force. Any other cent symbol would need to be added to the exclude to not match.
Matches
$1,501.13 | &#163;215 | €4.93
Non-Matches
01.00 | $.00 | &#162;50
Author Rating: The rating for this expression. Michael Ash
Title Test Details Quoted string
Expression
^(\x22|\x27)((?!\1).|\1{2})*\1$
Description
The regex validate a quoted string in VBScript or Ansi SQL. The string may contain the containing quote character if it is escaped by being doubled up. In VB/VBScript two double quotes within a string enclosed in double qoutes translate into one double quote within the string In SQL two single quotes within a string enclosed in single qoutes translate into one single quote within the string
Matches
"To quote Yoda (""Do, or do not. There is no 'try'"" )"
Non-Matches
'This won't validate' | "He said "Ok.""
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^(?=\d)(?:(?:31(?!.(?:0?[2469]|11))|(?:30|29)(?!.0?2)|29(?=.0?2.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(?:\x20|$))|(?:2[0-8]|1\d|0?[1-9]))([-./])(?:1[012]|0?[1-9])\1(?:1[6-9]|[2-9]\d)?\d\d(?:(?=\x20\d)\x20|$))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$
Description
DateTime Validator. This RE validates both dates and/or times patterns. Days in Feb. are also validated for Leap years. Dates: in dd/mm/yyyy or d/m/yy format between 1/1/1600 - 31/12/9999. Leading zeroes are optional. Date separators can be either matching dashes(-), slashes(/) or periods(.) Times: in the hh:MM:ss AM/PM 12 hour format (12:00 AM - 11:59:59 PM) or hh:MM:ss military time format (00:00:00 - 23:59:59). The 12 hour time format: 1) may have a leading zero for the hour. 2) Minutes and seconds are optional for the 12 hour format 3) AM or PM is required and case sensitive. Military time 1) must have a leading zero for all hours less than 10. 2) Minutes are manditory. 3) seconds are optional. Datetimes: combination of the above formats. A date first then a time separated by a space. ex) dd/mm/yyyy hh:MM:ss This RE is an variation of one of my other Datetime (mm/dd/yyyy) validator already in this library http://www.regexlib.com/REDetails.aspx?regexp_id=369, so the same rules for leap year apply. All 4 digit year and all two digit years except 00, which might not be a leap year.
Matches
31/12/2003 11:59:59 PM | 29-2-2004 | 01:45:02
Non-Matches
12/31/2003 | 29.02.2005 | 13:30 PM
Author Rating: The rating for this expression. Michael Ash
Title Test Details Pattern Title
Expression
,(?!(?<=(?:^|,)\s*\x22(?:[^\x22]|\x22\x22|\\\x22)*,)(?:[^\x22]|\x22\x22|\\\x22)*\x22\s*(?:,|$))
Description
This regex can be used to split the values of a comma delimitted list. List elements may be quoted, unquoted or empty. Commas inside a pair of quotation marks are not matched.
Matches
1,,3""but, wait",5 | 1,2,3
Non-Matches
"Test""a,b,c,d""ing" | no comma | semi; colon
Author Rating: The rating for this expression. Michael Ash
Title Test Details Enitity notation
Expression
& (?ni:\# # if a pound sign follow ampsand look for number ((x # if x follow pound sign accept hex value up to 5 digits ([\dA-F]){1,5} ) | # otherwise accept decimal number between 0 - 1048575 (104857[0-5] |10485[0-6]\d |1048[0-4]\d\d |104[0-7]\d{3} |10[0-3]\d{4} |0?\d{1,6}) ) | # no pound sign after ampersand ([A-Za-z\d.]{2,31}) #accept ASCII alphanumeric and period ); #end with semi-colon.
Description
This regex can be used to find general entites in HTML, XML and SGML files. The entity can consist of 1) an ampsand (&amp;) 2) followed by (a) ASCII alphanumerics or period between 2 and 31 characters or (b) a pound sign # (i) followed by an x followed by a unicode value up to 5 hex digits or (ii) followed by a decimal value from 0 to 1048575 3) ending with a semi-colon (;)
Matches
&quote; | &#169; | &#x00027;
Non-Matches
& | &#Hello; | &#Xray;
Author Rating: Not yet rated. Michael Ash
Title Test Details mm/dd/yyyy Julian and Gregrian Datetime
Expression
(?#Calandar from January 1st 45 BC to December 31, 9999 in mm/dd/yyyy format) (?! (?:10(?<sep>[-./])(?:0?[5-9]|1[0-4])\k<sep>(?:1582))| #Missing days from 1582 (?:0?9(?<sep>[-./])(?:0?[3-9]|1[0-3])\k<sep>(?:1752)) #or Missing days from 1752 (?# both sets of missing days such not be in the same calendar so remove one or the other) ) (?n:^(?=\d) # the character at the beginning a the sring must be a digit ( (?<month> (0?[13578])|1[02]| #months with 31 days (0?[469]|11)(?!.31)| # months with 30 days 0?2 # February (?(.29) # if feb 29th check for valid leap year (?=.29. (?! #exclude these years from leap year pattern 000[04] #No year 0 and no leap year in year 4 | (?:(?:1[^0-6]|[2468][^048]|[3579][^26])00) (?# centurial years > 1500 not evenly divisible by 400 are not leap year) ) (?:(?:(?:\d\d) # century (?:[02468][048]|[13579][26]) #leap years (?!\x20BC))|(?:00(?:42|3[0369]|2[147]|1[258]|09)\x20BC)) )| # else if not Feb 29 (?!.3[01]) # and day not Feb 30 or 31 ) #end Leap year check ) #end of month check (?<sep>[-./]) # choose a date separator (?<day>0?[1-9]|[12]\d|3[01]) #days between 1-31 (?# The maximum number of days allowed for a month has already been checked for in the month check. If you made it this far the number of day is within the range for the given month) \k<sep> # Match the same date separator choosen before. (?!0000) # There is no year 0 (?<year>(?=(?:00(?:4[0-5]|[0-3]?\d)\x20BC)|(?:\d{4}(?:\z|(?:\x20\d))))\d{4}(?:\x20BC)? # a four digit year. Use leading zeros if needed ) (?(?=\x20\d)\x20|$))? # if there is a space followed by a digit check for time (?<time> ( # 12 hour format (0?[1-9]|1[012]) # hours (:[0-5]\d){0,2} # optional minutes and seconds (?i:\x20[AP]M) # required AM or PM )| # 24 hour format ( [01]\d|2[0-3]) #hours (:[0-5]\d){1,2}) #required minutes optional seconds ?$)
Description
Datetime for Julian and Gregorian Calenders Matchs dates from 0001 A.D. to 9999 A.D. Days and months are 1 or 2 digits Years are 4 digit with leading zeros if required. February is validate in all leap years Leap year rules for Julian and Gregorian calendars (http://scienceworld.wolfram.com/astronomy/LeapYear.html) Missing days for 1582 and 1752 are not matched. Though only one set should be applied to a calendar since they are caused by when the calendar was adopted Missing days (http://scienceworld.wolfram.com/astronomy/GregorianCalendar.html) Time can be either 12 or 24 hour format 12 hour format hh:MM:ss AM|PM minutes and seconds are optional 24 hour format hh:mm:ss seconds are optional, hours less than ten require leading zero Datetome format is a date, a space then a time.
Matches
12/25/0004 | 12/31/0001 BC 2:15 AM | 2-29-2004 09:00
Non-Matches
00/00/0000 | 2-29-2100 | 10/8/1582
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
\p{IsBasicLatin}
Description
Matches any character is the Basic Latin Unicode Range \U0000-U007F (Ascii 0-127) I've blogged about this and other expressions here http://blogs.regexadvice.com/mash/archive/2004/04/17/988.aspx
Matches
ABCxyz | 123 | +-=
Non-Matches
? | ? | ?
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
\p{N}
Description
Matches numbers. Note: the second match (?) and the second non-match (IV) are not the same. I cover this in more detail here http://blogs.regexadvice.com/mash/archive/2004/04/17/988.aspx
Matches
123890 | ? | &#189;
Non-Matches
AAABB | IV | Ten
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
\p{Sm}
Description
Math Symbols. NOTE: the second examples of match and non-match are not the same. The non-match is the keyboard dash. The match is the unicode minus sign.
Matches
+= | - | &#177; v =
Non-Matches
1 | - | 1x2
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^(?=[^\d_].*?\d)\w(\w|[!@#$%]){7,20}
Description
This regex can be used to restrict passwords to a length of 8 to 20 aplhanumeric characters and select special characters. The password also can not start with a digit, underscore or special character and must contain at least one digit.
Matches
password1 | pa$$word2 | pa!@#$%3
Non-Matches
password | 1stpassword | $password#
Author Rating: The rating for this expression. Michael Ash
Title Test Details yyyy/mm/dd hhMMss Date
Expression
^(?ni:(?=\d)((?'year'((1[6-9])|([2-9]\d))\d\d)(?'sep'[/.-])(?'month'0?[1-9]|1[012])\2(?'day'((?<!(\2((0?[2469])|11)\2))31)|(?<!\2(0?2)\2)(29|30)|((?<=((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00)\2\3\2)29)|((0?[1-9])|(1\d)|(2[0-8])))(?:(?=\x20\d)\x20|$))?((?<time>((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2}))?)$
Description
YYYY/MM/DD hh:mm:ss format DateTime Regex. This regex will validate a date, time or a datetime. It will also capture the date fields and the time. Dates are in the YYYY/MM/DD format and validated for months, number of days in a month and leap years (29/2) Date field can be separated by matched periods(.), dashes(-) or forward slashes(/) Time is either 12 hour AM/PM format (hh:mm:ss AM), where minutes and seconds are optional. AM or PM required. or 24 hour military format (hh:mm:ss), from 00:00:00 to 23:59:59, where hours and minutes fields are required, including leading 0 for hours less than 10. Please refer to http://blogs.regexadvice.com/mash/archive/2004/04/23/1021.aspx for additional info Datetime is the above date and time formats separated by a space, with the date first (YYYY/MM/DD hh:mm:ss) !IMPORTANT NOTE: your regex engine must support lookbehinds and named groups to use this expression
Matches
12:30 PM | 2004-02-29 | 2004/3/31 02:31:35 AM
Non-Matches
2:00 | 2200.2.29 | 0000/00/00 00:00:00 AM
Author Rating: The rating for this expression. Michael Ash
Title Test Details Pattern Title
Expression
(?i:([A-D])(?!\1)([A-D])(?!\1|\2)([A-D])(?!\1|\2|\3)([A-D]))
Description
This regex validates a string of non-repeating characters A, B, C, D.
Matches
abcd | dbca | badc
Non-Matches
abba | baaa | cabb
Author Rating: Not yet rated. Michael Ash
Title Test Details Social Security Number
Expression
^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$
Description
This regex validates U.S. social security numbers, within the range of numbers that have been currently allocated.
Matches
078-05-1120 | 078 05 1120 | 078051120
Non-Matches
987-65-4320 | 000-00-0000 | (555) 555-5555
Author Rating: The rating for this expression. Michael Ash
Title Test Details HTML 4.01 Elements
Expression
(<\/?)(?i:(?<element>a(bbr|cronym|ddress|pplet|rea)?|b(ase(font)?|do|ig|lockquote|ody|r|utton)?|c(aption|enter|ite|(o(de|l(group)?)))|d(d|el|fn|i(r|v)|l|t)|em|f(ieldset|o(nt|rm)|rame(set)?)|h([1-6]|ead|r|tml)|i(frame|mg|n(put|s)|sindex)?|kbd|l(abel|egend|i(nk)?)|m(ap|e(nu|ta))|no(frames|script)|o(bject|l|pt(group|ion))|p(aram|re)?|q|s(amp|cript|elect|mall|pan|t(r(ike|ong)|yle)|u(b|p))|t(able|body|d|extarea|foot|h|itle|r|t)|u(l)?|var))(\s(?<attr>.+?))*>
Description
This RE will match all the valid elements in HTML 4.01
Matches
<HTML> | <a href="link.html">Link</a>
Non-Matches
<xml> | <phonytag> | <image>
Author Rating: The rating for this expression. Michael Ash
Title Test Details (X)HTML click events
Expression
(?i:on(blur|c(hange|lick)|dblclick|focus|keypress|(key|mouse)(down|up)|(un)?load|mouse(move|o(ut|ver))|reset|s(elect|ubmit)))
Description
This regex will match all the valid on event attributes in HTML 4.01/XHTML 1.0
Matches
onclick | onsubmit | onmouseover
Non-Matches
click | onandon | mickeymouse
Author Rating: The rating for this expression. Michael Ash
Title Test Details MM/dd/yyyy HH:mm:ss.fff Datetime \w milliseconds
Expression
(?n:^(?=\d)((?<month>(0?[13578])|1[02]|(0?[469]|11)(?!.31)|0?2(?(.29)(?=.29.((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|(?!.3[01])))(?<sep>[-./])(?<day>0?[1-9]|[12]\d|3[01])\k<sep>(?<year>(1[6-9]|[2-9]\d)\d{2})\x20)(?<time>(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d):(?<seconds>[0-5]\d)\.(?<milliseconds>\d{3}))$)
Description
Date-time with milliseconds. MM/dd/yyyy HH:mm:ss.fff Time is in military format and requires leading zeroes for single digit hours and seconds and two digit milliseconds. All fields are required. This was a special request modification of another regex.
Matches
05/4/2005 12:34:53.102 | 12/31/2096 23:59:59.999
Non-Matches
05/4/2005 | 12:34:53.102
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
Expression
^((?:[a-zA-Z]:)|(?:\\{2}\w[-\w]*)\$?)\\(?!\.)((?:(?![\\/:*?<>"|])(?![.\x20](?:\\|$))[\x20-\x7E])+\\(?!\.))*((?:(?:(?![\\/:*?<>"|])(?![ .]$)[\x20-\x7E])+)\.((?:(?![\\/:*?<>"|])(?![ .]$)[\x20-\x7E]){2,15}))?$
Description
Matches drives, folders and file on a Windows OS. Folder matches must end with \ Folder and file names can not end with a space. I limited the file extension length to 15 though that not a restriction of a file's extension This is a mod of Darren's regex http://www.regexlib.com/REDetails.aspx?regexp_id=357 and my own http://www.regexlib.com/REDetails.aspx?regexp_id=137 Updated Feb 2005
Matches
C:\ | \\Server\share\path\File.txt | E:\My Files\Are\#1\
Non-Matches
C: | C:\\\ | C:\Trailing Space \
Author Rating: Not yet rated. Michael Ash
Title Test Details A.D. Calendar dates
Expression
(?#Calandar from January 1st 1 A.D to December 31, 9999 )(?# in yyyy-mm-dd format )(?!(?:1582\D10\D(?:0?[5-9]|1[0-4]))|(?#Missing days from 1582 )(?:1752\D0?9\D(?:0?[3-9]|1[0-3]))(?#or Missing days from 1752 )(?# both sets of missing days should not be in the same calendar so remove one or the other))(?n:^(?=\d)(?# the character at the beginning a the string must be a digit )((?'year'\d{4})(?'sep'[-./])(?'month'0?[1-9]|1[012])\k'sep'(?'day'(?<!(?:0?[469]|11).)31|(?<!0?2.)30|2[0-8]|1\d|0?[1-9]|(?# if feb 29th check for valid leap year )(?:(?<=(?!(?#exclude these years from leap year pattern ) 000[04](?#No year 0 and no leap year in year 4 )|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00)(?# centurial years > 1500 not evenly divisible by 400 are not leap year))(?:(?:\d\d)(?# century)(?:[02468][048]|[13579][26])(?#leap years))\k'sep'(?:0?2)\k'sep')|(?# else if not Feb 29 )(?<!\k'sep'(?:0?2)\k'sep')(?# and day not Feb 30 or 31 ))29)(?(?=\x20\d)\x20|$))?(?# if there is a space followed by a digit check for time )(?<time>((?# 12 hour format )(0?[1-9]|1[012])(?# hours )(:[0-5]\d){0,2}(?# optional minutes and seconds )(?i:\x20[AP]M)(?# required AM or PM ))|(?# 24 hour format )([01]\d|2[0-3])(?#hours )(:[0-5]\d){1,2})(?#required minutes optional seconds )?$)
Description
yyyy-mm-dd Datetime for AD, with leap year. See http://blogs.regexadvice.com/mash/archive/2004/04/23/1021.aspx for details on similar regexs
Matches
0001-06-16 12:00:01 AM | 2004/2/29 | 3:30 PM
Non-Matches
9999/99/99 | 24:00:00 | 2003-02-29
Author Rating: The rating for this expression. Michael Ash
Title Test Details Pattern Title
Expression
(?=\d)^(?:(?!(?:10\D(?:0?[5-9]|1[0-4])\D(?:1582))|(?:0?9\D(?:0?[3-9]|1[0-3])\D(?:1752)))((?:0?[13578]|1[02])|(?:0?[469]|11)(?!\/31)(?!-31)(?!\.31)|(?:0?2(?=.?(?:(?:29.(?!000[04]|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00))(?:(?:(?:\d\d)(?:[02468][048]|[13579][26])(?!\x20BC))|(?:00(?:42|3[0369]|2[147]|1[258]|09)\x20BC))))))|(?:0?2(?=.(?:(?:\d\D)|(?:[01]\d)|(?:2[0-8])))))([-.\/])(0?[1-9]|[12]\d|3[01])\2(?!0000)((?=(?:00(?:4[0-5]|[0-3]?\d)\x20BC)|(?:\d{4}(?!\x20BC)))\d{4}(?:\x20BC)?)(?:$|(?=\x20\d)\x20))?((?:(?:0?[1-9]|1[012])(?::[0-5]\d){0,2}(?:\x20[aApP][mM]))|(?:[01]\d|2[0-3])(?::[0-5]\d){1,2})?$
Description
mm/dd/yyyy hh:MM:ss Datetime for all AD years, including leap years. Javascript safe version of http://regexlib.com/REDetails.aspx?regexp_id=644. Please see that regex for details of what is being checked
Matches
11/24/0004 11:59 PM | 2.29.2008 | 02:50:10
Non-Matches
12/33/1020 | 2/29/2005 | 13:00 AM
Author Rating: Not yet rated. Michael Ash
Change page:   |    Displaying page 27 of 41 pages; Items 2601 to 2700

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