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: 3315 regular expressions found.

Change page:   |    Displaying page 27 of 34 pages; Items 2601 to 2700
Title Test Details Pattern Title
Expression
^[^#]([^ ]+ ){6}[^ ]+$
Description
We've come across the situation where we had to extract the IIS-Log entries without the header information. The data is far more complex than the sample given. Explanation: ^[^#] = lines not beginnin with # ([^ ]+ ){6} = 6 times no space until one space [^ ]+ = no spaces allowed... $ = ...until end of line For further explanation don't hesitate to write E-Mail.
Matches
1111 2222 33 44444 55 6 7777
Non-Matches
#IIS Logfile header
Author Rating: Not yet rated. Volker Roth
Title Test Details Feet-inch to Decimal
Expression
(?:(?:(?<Feet>\d+)[ ]*(?:'|ft)){0,1}[ ]*(?<Inches>\d*(?![/\w])){0,1}(?:[ ,\-]){0,1}(?<Fraction>(?<FracNum>\d*)\/(?<FracDem>\d*)){0,1}(?<Decimal>\.\d*){0,1}(?:\x22| in))|(?:(?<Feet>\d+)[ ]*(?:'|ft)[ ]*){1}
Description
I needed an expression that would break down a written measurement, like 12' 2-15/16", into groups of feet, inches, fractional inches (num/dem). This is a modified expression based on Trevor Braun's orginal regex. Added the "ft" & "in" suffixes and the fraction's Numerator & Denominator groups.
Matches
1ft 2-3/4 in, 2' 3 4/5", 3ft, 4', 5 in, 6", 7.125 in, 3ft 4.5 in
Non-Matches
1ft 2-3/4in, 4in
Author Rating: Not yet rated. Normand Frechette
Title Test Details Validate Multiple Email Addresses
Expression
^((\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)\s*[,]{0,1}\s*)+$
Description
This will validate multiple email addresses that are comma delimited. You can change it to use commas or semilcolons. If you have to worry about a lot of special characters, you may have to edit it a little bit. It allows white space before and after the comma.
Matches
Test@host.com|email1@host.com,email2@host.com,email3@host.com|email1@host.com, email2@host.com , email3@host.com
Non-Matches
test@test|test@host.com,test@|test@ host.com
Author Rating: The rating for this expression. Dan Lorenz
Title Test Details remove HTML comments from html page
Expression
(\<!--\s*.*?((--\>)|$))
Description
matches comments <!-- --> in string. Singleline option must be enabled. It works well also with multiple comment start tags such as: <!--this is comment <!--and this as well and end-- of comment is!-- >right now-->. It also matches comments in between script or style tags <script> <!-- --> </script>
Matches
<!-- comment <!-- continuing -- >and ends now-->
Non-Matches
< !-- not comment -->, <a href="--">, all other html code
Author Rating: Not yet rated. David Havl
Title Test Details Get all code inside of php tag in page
Expression
(\<\?php\s+.*?((\?\>)|$))
Description
Get code in between php tag <?php and ?> or until end of string if end of tag not found. Singleline option must be enabled!
Matches
<?php this is code in php ?>
Non-Matches
text outside php tag
Author Rating: The rating for this expression. David Havl
Title Test Details Domain restriction check
Expression
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|biz|info|name|aero|biz|info|jobs|museum)\b
Description
Just a try....
Matches
abc@yatra.com
Non-Matches
hgf@ghjg@jkh.com.fgh.df.dfdf.dfdf
Author Rating: Not yet rated. Leojhose
Title Test Details Pattern Title
Expression
^([1-9]|1[0-2]|0[1-9]){1}(:[0-5][0-9][aApP][mM]){1}$
Description
Very simple expression to validate time on a 12 hour clock, this expression is valid for client-side script validations (RegularExpressionValidator - ASP.NET).
Matches
08:00AM | 10:00am | 7:00pm
Non-Matches
13:00pm | 12:65am
Author Rating: The rating for this expression. Roberto Hernández
Title Test Details Pattern Title
Expression
^[a-zA-Z0-9_\s-]+$
Description
This tests an input string for only a-z and A-Z and only allows underscores, hyphens and spaces. The purpose is to force users to generate legitimate, readable file names that can be streamed from the web.
Matches
123Testing | 123_Testing | 123-Testing This
Non-Matches
!@#Testing | Testing &quot;This&quot; | Don't Forget to Write
Author Rating: The rating for this expression. Paul Fox
Title Test Details Phone Number Validation for Finland
Expression
^((([\+][\s]{0,1})|([0]{2}[\s-]{0,1}))([358]{3})([\s-]{0,1})|([0]{1}))(([1-9]{1}[0-9]{0,1})([\s-]{0,1})([0-9]{2,4})([\s-]{0,1})([0-9]{2,4})([\s-]{0,1}))([0-9]{0,3}){1}$
Description
General phone number validation for Finland. It will pass old and new format numbers. Between numbers space or dash can be used ones. number has to start +358 or 00358 or 0 are code can be 2 or 3 digit. I could not come with better idea then this
Matches
003589999999 | 00 358 999 999 | 00 358 9999 999 | 00 358 999 9999 | 091212 | 09 99 99 99
Non-Matches
050 999 9999 9999 999 | 151212
Author Rating: Not yet rated. Hakan Kucukel
Title Test Details Hijri Date
Expression
^([1-9]|(0|1|2)[0-9]|30)(/|-)([1-9]|1[0-2]|0[1-9])(/|-)(14[0-9]{2})$
Description
Validate Hijri Dates thanks to tutoweb
Matches
24/02/1431 02/12/1400 12/3/1499
Non-Matches
31/02/1431 03/13/1400 12/3/1500
Author Rating: Not yet rated. Mohamed Bakr
Title Test Details Australian Postcodes
Expression
^[2-7]{1}[0-9]{3}$
Description
Matches all valid Australian postcodes
Matches
6012 | 4475 | 2004
Non-Matches
1002 | 9898 | 0004
Author Rating: Not yet rated. Grant Spencer
Title Test Details Currency - Money
Expression
^(-?\$?([1-9]\d{0,2}(,\d{3})*|[1-9]\d*|0|)(.\d{1,2})?|\(\$?([1-9]\d{0,2}(,\d{3})*|[1-9]\d*|0|)(.\d{1,2})?\))$
Description
Handles any kind of money entry. With $ sign or not, with commas or not. With bracket, negative sign or none. Max of 2 decimal points. It's perfect :)
Matches
112.12 $1,112.15 (15555.5) $.12 0.1
Non-Matches
$111,1.15 52.121 (123.12 s123
Author Rating: The rating for this expression. Salam Abbas
Title Test Details Improved SSN
Expression
^((?!000)(?!666)([0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-1]))(\s|\-)((?!00)\d{2})(\s|\-)((?!0000)\d{4})$
Description
Used Tim Cartwright example and added \s or - for separators.
Matches
455-55-4444|333 22-1111|733 11 1111
Non-Matches
734-00-1111|749-11-0000|666-11-1111
Author Rating: Not yet rated. Bill Fitzpatrick
Title Test Details USA Phone
Expression
^(\d)?[ ]*[\(\.\-]?(\d{3})[\)\.\-]?[ ]*(\d{3})[\.\- ]?(\d{4})[ ]*(x|ext\.?)?[ ]*(\d{1,7})?$
Description
Requires area code. Allows extension. Any common US format works. If you prefer not to require area code, use this: ^(\d)?[ ]*[\(\.\-]?(\d{3})?[\)\.\-]?[ ]*(\d{3})[\.\- ]?(\d{4})[ ]*(x|ext\.?)?[ ]*(\d{1,7})?$
Matches
1 (123) 123-1234 ext. 1234567 | 1 (123) 123-1234 | (123) 123-1234 | (123)123.1234 | 1-123-123-1234 | 1231231234
Non-Matches
123/1234 L. 12345678
Author Rating: Not yet rated. Rob Eberhardt
Title Test Details Email
Expression
^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$
Description
regex to validate email address noteworthy: (1) It allows usernames with 1 or 2 alphanum characters, or 3+ chars can have -._ in the middle. username may NOT start/end with -._ or any other non alphanumeric character. (2) It allows heirarchical domain names (e.g. me@really.big.com). Similar -._ placement rules there. (3) It allows 2-9 character alphabetic-only TLDs (that oughta cover museum and adnauseum :&gt;). (4) No IP email addresses though -- I wouldn't Want to accept that kind of address.
Matches
e@eee.com | eee@e-e.com | eee@ee.eee.museum
Non-Matches
.@eee.com | eee@e-.com | eee@ee.eee.eeeeeeeeee
Author Rating: The rating for this expression. Rob Eberhardt
Title Test Details Pattern Title
Expression
^[a-zA-Z0-9&#192;&#193;&#194;&#195;&#196;&#197;&#198;&#199;&#200;&#201;&#202;&#203;&#204;&#205;&#206;&#207;&#208;&#209;&#210;&#211;&#212;&#213;&#214;&#216;&#217;&#218;&#219;&#220;&#221;&#223;&#224;&#225;&#226;&#227;&#228;&#229;&#230;&#231;&#232;&#233;&#234;&#235;&#236;&#237;&#238;&#239;&#241;&#242;&#243;&#244;&#245;&#246;&#248;&#249;&#250;&#251;&#252;&#253;&#255;\.\,\-\/\']+[a-zA-Z0-9&#192;&#193;&#194;&#195;&#196;&#197;&#198;&#199;&#200;&#201;&#202;&#203;&#204;&#205;&#206;&#207;&#208;&#209;&#210;&#211;&#212;&#213;&#214;&#216;&#217;&#218;&#219;&#220;&#221;&#223;&#224;&#225;&#226;&#227;&#228;&#229;&#230;&#231;&#232;&#233;&#234;&#235;&#236;&#237;&#238;&#239;&#241;&#242;&#243;&#244;&#245;&#246;&#248;&#249;&#250;&#251;&#252;&#253;&#255;\.\,\-\/\' ]+$
Description
This simple regexp should match any possible italian address entry and doesn't match NULL entries (good if address is required). Should work well for any other address (it's been verified against 250 addresses from most european countries, usa and australia. Please mail me if there's something missing
Matches
v.le dell'industria 45/a | via genova 45-3-d | p.zza Garibaldi, 48
Non-Matches
[NULL]
Author Rating: Not yet rated. paolo beltrami
Title Test Details Fixed Local code
Expression
^[A-Z0-9\\-\\&-]{5,12}$
Description
Exchange Local code
Matches
BCAST-E2|ONHER-300812|ONHER-3&00812
Non-Matches
ONHER@@@0812
Author Rating: Not yet rated. clara fernandes
Title Test Details UK Phone Number
Expression
^((\+44\s?\d{4}|\(?\d{5}\)?)\s?\d{6})|((\+44\s?|0)7\d{3}\s?\d{6})$
Description
Allows both mobile and landline UK Telephone Numbers. Allows either Brackets or international prefix. Allows spaces after international prefix and regional code. No brackets for mobile numbers. Please report any problems. Thanks
Matches
01902123456 | 01902 123456 | (01902)123456 | (01902) 123456 | +441902123456 | +441902 123456 | +44 1902123456 | +44 1902 123456 | 07807123456 | 07807 123456 | +447807123456 | +447807 123456 | +44 7807123456 | +44 7807 123456
Non-Matches
11902123456 | (+441902)123456 | 441902123456 | (078)07123456
Author Rating: Not yet rated. Jay Anslow
Title Test Details Uri net.tcp, ftp, http
Expression
^(net.tcp\://|(ht|f)tp(s?)\://)\S+
Description
For validate uri directions that must occur at the beginning of the string net.tcp|http|https|ftp|ftps://
Matches
http://ww.nancy.net/Servicios/ProxyWSService.svc|net.tcp://testwcf02.com:808/Tasacion|ftps://nancy.inet:/ProxyFTP
Non-Matches
C: | C:\inetpub\wwwroot\file.asmx | file.svc
Author Rating: Not yet rated. sarin torrealba
Title Test Details South African Landline numbers
Expression
^(?:(?:\(|)0|\+27|27)(?:1[12345678]|2[123478]|3[1234569]|4[\d]|5[134678])(?:\) | |-|)\d{3}(?: |-|)\d{4}$
Description
Limited by proper dialing codes as per http://en.wikipedia.org/wiki/Telephone_numbers_in_South_Africa. It will match phone numbers in most common formats that users normally type their phone number. Tested with Perl engine regex in PHP.
Matches
+27121234567 +2712 123 4567 012 123 4567 (012) 123 4567 (012) 123-4567
Non-Matches
27621234567
Author Rating: Not yet rated. Ian van den Heuvel
Title Test Details Czech telephone number
Expression
[^0-9]((\(?(\+420|00420)\)?( |-)?)?([0-9]{3} ?(([0-9]{3} ?[0-9]{3})|([0-9]{2} ?[0-9]{2} ?[0-9]{2})))|([0-9]{3}-(([0-9]{3}-[0-9]{3})|([0-9]{2}-[0-9]{2}-[0-9]{2}))))[^0-9|/]
Description
Regexp for czech telephone number format. Fix to bank account number
Matches
+420 123 456 789, 00420 123 456 789, 123456789
Non-Matches
+420 1234567899, 100420 123 456 789, 123456789/0000
Author Rating: Not yet rated. Nixxy
Title Test Details Checking of currency on key down
Expression
^(([1-9]{1}[0-9]{0,5}([.]{1}[0-9]{0,2})?)|(([0]{1}))([.]{1}[0-9]{0,2})?)$
Description
This will allow your app to check currency during events such as key down (set to decimal(8,2) only)
Matches
13 | 13. | 13.1 | 13.11 | 0. | 0.1
Non-Matches
01 | .1 | 0.011
Author Rating: Not yet rated. CL Yeo
Title Test Details Pattern Title
Expression
^(([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+))$
Description
Matches simple IP addresses. It's not too complex or long, but it does the job if you want something short/simple.
Matches
113.173.40.255 | 171.132.248.57 | 79.93.28.178
Non-Matches
189.57.135 | 14.190.193999 | A.N.D.233
Author Rating: Not yet rated. Jag fire
Title Test Details Pattern Title
Expression
^(\{|\[|\().+(\}|\]|\)).+$
Description
Matches &quot;clan&quot; nicks/names.
Matches
{CLaN}nick | [Clan]Nick | (Clan)Nick
Non-Matches
Nick
Author Rating: Not yet rated. Jag fire
Title Test Details Pattern Title
Expression
^\s*-?(\d*\.)?([0-2])?[0-9]:([0-5])?[0-9]:([0-5])?[0-9](\.[0-9]{1,7})?\s*$
Description
This should be the pattern described in the documentation for the .NET TimeSpan.Parse method - generally parses time spans. From the .NET docs: public static TimeSpan Parse(string s); The s parameter contains a specification of the form: [ws][-][d.]hh:mm:ss[.ff][ws] Items in square brackets ([ and ]) are optional, colons and periods (: and .) are literal characters, and other items are as follows. Item Description ws optional white space &quot;-&quot; optional minus sign indicating a negative time &quot;d&quot; optional days &quot;hh&quot; hours, ranging from 0 to 23 &quot;mm&quot; minutes, ranging from 0 to 59 &quot;ss&quot; seconds, ranging from 0 to 59 &quot;ff&quot; optional fractional seconds, from 1 to 7 decimal digits
Matches
10:12:34 | 932323.9:00:32.3420
Non-Matches
10:20:80
Author Rating: Not yet rated. Philipp Schumann
Title Test Details Gcode Signed Floating Point Number
Expression
(?<=((\s|\n)[XYZABCIJKxyzabcijk]))-?((\d*\.\d+)|(\d+\.\d*)|(\d+\.\d+))(\s|\n)
Description
some machines use multiples of .0001 inch, and some use whole inches if there is no decimal point. This can lead to expensive crashes of machines. It is good practice to have a decimal point in most of our numbers, Everything else is a potential error. I may need to add a \r to the (\s|\n) area on windows, but I don't know. It will be invalid gcode to start the program with X.5 without something like a G01 in front of it, So I didn't put any special consideration to the beginning of the file because There should always be an M command at the end and something else beginning This is probably overkill back detecting the preceding character, as my syntax highlighter will likely use those characters to start a mode, and end on a space, so my single character will be validated for me before hand.
Matches
X2.5 | Y.5 | Z2. | A5335332.3533 | B-.2 | C-5. | I-42.53
Non-Matches
| . | Y. | 2.4. | ..2 | 2 | 6434 | -. | - | 6-3.4 | . | 2.4. | ..2 | 2 | 6434 | -. | - | 6-3.4 | YY2.4 | 2.5Y24 | Y2Y24.5 | G01 | G02
Author Rating: Not yet rated. Aaron Peterson
Title Test Details Signed Floating Point Number by itself
Expression
^-?((\d*\.\d+)|(\d+\.\d*)|(\d+\.\d+))$
Description
A number with a single decimal point in it. Get rid of the ^'s and $'s if it can bump a word.
Matches
2.5 .5 2. 5335332.3533 -.2 -5. -42.53
Non-Matches
. 2.4. ..2 2 6434 -. - 6-3.4
Author Rating: Not yet rated. Aaron Peterson
Title Test Details Prefix / Voorvoegsel / Präfix
Expression
(([a-z']?[a-z' ]*)|([a-z][\.])?([a-z][\.]))
Description
Tests the most common prefixes as used in The Netherlands and Germany . Commom abbreviations "v." and "v.d." are also covered.
Matches
van 't | von | v.d. | auf dem
Non-Matches
v.'t | VON | van d.
Author Rating: Not yet rated. Willem Mulder
Title Test Details Dutch Postal code
Expression
^[0-9]{4} {0,1}[A-Z]{2}$
Description
Check the Dutch postal code offical format of "9999 AA". Since it is often stored in a database without the space, this pattern allows 0 or 1 space.
Matches
9999 AA | 9999AA
Non-Matches
9999 aa | 9999?AA
Author Rating: Not yet rated. Willem Mulder
Title Test Details Number
Expression
^-?(\d+(,\d{3})*(\.\d+)?|\d?(\.\d+))$
Description
Matches any floating point numeric string with or without commas.
Matches
123 | 9,001 | -123,456,789.123 | 3.14159 | .25
Non-Matches
abc | - | 123,456,78 | 0.123.456 | 234.567,890 | ,123,456
Author Rating: Not yet rated. schooley
Title Test Details Find standalone integers
Expression
(?<!\.)(?<!e[+-])(\b\d+\b)(?!\.)
Description
Locates standalone integers, like the 1 and 4 in 1/4, but doesn't match the 5 in 6e-5 (nor the 6, in fact). I use this to convert 1/4 to 1.0/4.0 so that it can be evaluated as a floating number, since 1/4 by itself will normally eval to 0 (integer division). However, 6e-5.0 would not be valid.
Matches
1/4 | 1e-2+1/4 | 1.2+4/7
Non-Matches
1.9e-2 | 1e+3 | 1e4
Author Rating: Not yet rated. Anders Blom
Title Test Details 12 Hour Time
Expression
((\d{0}[0-9]|\d{0}[1]\d{0}[0-2])(\:)\d{0}[0-5]\d{0}[0-9](\:)\d{0}[0-5]\d{0}[0-9]\s(AM|PM))
Description
Matches hours 0-12:minutes 0-59:seconds 0-59 AM|PM
Matches
0:00:00 AM, 11:59:59 PM,12:00:00 AM, 5:34:00 PM
Non-Matches
1:00 AM, 5:3:00 PM, 5:34:00 P,5:34:00 Pm
Author Rating: Not yet rated. Robert Godwin
Title Test Details Pattern Title
Expression
^([0-9]{2})?((\([0-9]{2})\)|[0-9]{2})?([0-9]{3}|[0-9]{4})(\-)?[0-9]{4}$
Description
A simple expression to brazilian phone number code modified expression of Rafael, beyond international code, simple DDI without &quot;+&quot; 99 plus simple DDD (99) plus simple and whitout parentheses em trace, local phone number 3 or 4 digits plus &quot;-&quot; plus 4 digits.
Matches
552123236699 | 212323-6699 | 2323-6699
Non-Matches
[3434-3432] | [4(23)232-3232] | [55(2)232-232]
Author Rating: Not yet rated. wallace dos santos damiao
Title Test Details Pattern Title
Expression
^(((((((0?[13578])|(1[02]))[\.\-/]?((0?[1-9])|([12]\d)|(3[01])))|(((0?[469])|(11))[\.\-/]?((0?[1-9])|([12]\d)|(30)))|((0?2)[\.\-/]?((0?[1-9])|(1\d)|(2[0-8]))))[\.\-/]?(((19)|(20))?([\d][\d]))))|((0?2)[\.\-/]?(29)[\.\-/]?(((19)|(20))?(([02468][048])|([13579][26])))))$
Description
Simple American date format mm-dd-yyyy or mm-dd-yy, no time. Date range is 1900 --&gt; 2099. Is enough for my purposes. Incorectly validates 02-29-1900. I created this to validate dates on a web form where the likely range will be 2000--&gt;2020. Seperators can be '.','/' or '-' Anyone know the rules for operator precedence for regex syntax?
Matches
02-29-2004 | 1/31/1997 | 1-2-03
Non-Matches
02-29-2003 | 04-31-2003 | 31-03-05
Author Rating: The rating for this expression. Neil Walls
Title Test Details IP Address Validator
Expression
\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b
Description
This regex expression validates IP addresses when processed as a string.
Matches
127.0.0.1 | 64.125.39.85 | 192.168.8.50
Non-Matches
255.143.20.3 | 300.23.105.3 | 29.100.340.23
Author Rating: Not yet rated. Frank Tanner
Title Test Details Manage negative double integer with four decimal
Expression
^[-]?[0-9]*\.?[0-9]?[0-9]?[0-9]?[0-9]?
Description
Manage negative double integer with four decimal
Matches
123.1234,-12.12,1234
Non-Matches
+123,12.123456
Author Rating: Not yet rated. yk
Title Test Details Pattern Title
Expression
[^(\&amp;)](\w*)+(\=)[\w\d ]*
Description
Query string parser matches and tokenizes each name/value pair for a valid query string.
Matches
name1=value1&amp;name2=value2&amp;...
Non-Matches
anyoldstring
Author Rating: Not yet rated. Chuck D
Title Test Details IP validator
Expression
/^(?:(?:1\d?\d|[1-9]?\d|2[0-4]\d|25[0-5])\.){3}(?:1\d?\d|[1-9]?\d|2[0-4]\d|25[0-5])$/
Description
It matches an IP address only in the correct format. There was a previous regex send which matches 192.168.01.2 but this code won't match preceeding 0's
Matches
192.168.1.2 | 127.0.0.1
Non-Matches
192.168.01.2 | 1921.68.1.2
Author Rating: The rating for this expression. snabbi
Title Test Details BV_SessionID=@@@@0106700396.1206001747@@@@&BV_EngineID=ccckadedjddehggcefecehidfhfdflg.0
Expression
BV_SessionID=@@@@0106700396.1206001747@@@@&BV_EngineID=ccckadedjddehggcefecehidfhfdflg.0
Description
www.irctc.co.in
Matches
BV_SessionID=@@@@0106700396.1206001747@@@@&BV_EngineID=ccckadedjddehggcefecehidfhfdflg.0
Non-Matches
BV_SessionID=@@@@0106700396.1206001747@@@@&BV_EngineID=ccckadedjddehggcefecehidfhfdflg.0
Author Rating: Not yet rated. vipin kumar
Title Test Details Pattern Title
Expression
^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$
Description
Matches ANSI SQL date format YYYY-mm-dd hh:mi:ss am/pm. You can use / - or space for date delimiters, so 2004-12-31 works just as well as 2004/12/31. Checks leap year from 1901 to 2099.
Matches
2004-2-29 | 2004-02-29 10:29:39 pm | 2004/12/31
Non-Matches
2003-2-29 | 2003-13-02 | 2003-2-2 10:72:30 am
Author Rating: Not yet rated. Sung Lee
Title Test Details Pattern Title
Expression
^((((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9]))))[\-\/\s]?\d{2}(([02468][048])|([13579][26])))|(((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))[\-\/\s]?\d{2}(([02468][1235679])|([13579][01345789]))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$
Description
This regex will match SQL Server datetime values, allowing date only, allowing zero padded digits in month, day and hour, and will match leap years from 1901 up until 2099.
Matches
2/29/2004 | 04/01/2003 10:01:23 am | 03-20-1999
Non-Matches
2/29/2003 | 13/30/2001 10:05:00 pm | 12/32/2003
Author Rating: Not yet rated. Sung Lee
Title Test Details US State Full Names
Expression
qr/(Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New\sHampshire|New\sJersey|New\sMexico|New\sYork|North\sCarolina|North\sDakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode\sIsland|South\sCarolina|South\sDakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West\sVirginia|Wisconsin|Wyoming)/
Description
Just a quick list of all the United States 50 States Full Names (Not Abbreviations)
Matches
Texas | North Carolina | New York
Non-Matches
Tx | TX | Texan | D.C. Washington | NewYork
Author Rating: Not yet rated. Steve Lilley
Title Test Details Pattern Title
Expression
((ht|f)tp(s?))(:((\/\/)(?!\/)))(((w){3}\.)?)([a-zA-Z0-9\-_]+(\.(com|edu|gov|int|mil|net|org|biz|info|name|pro|museum|co\.uk)))(\/(?!\/))(([a-zA-Z0-9\-_\/]*)?)([a-zA-Z0-9])+\.((jpg|jpeg|gif|png)(?!(\w|\W)))
Description
This expression matches valid image URLs. The main use for this would be in UBBC tags. Written by RyanJ and Jick for FWD (http://flexwebdev.thenamesdan.com/)
Matches
http://www.location.com/images/image1.gif | http://www.location.com/images/mainImgs/image1.png
Non-Matches
/images/image1.jpeg | http://www.location.com/images/image1.swf | http://www.something.com/hello/..j
Author Rating: The rating for this expression. Ryan Jones
Title Test Details label having date
Expression
^(\d{4})[.](0{0,1}[1-9]|1[012])[.](0{0,1}[1-9]|[12][0-9]|3[01])[.](\d{2})$
Description
capture labels having format yyyy.mm.dd.nn here nn is for number s from 00 to 99
Matches
2006.10.09.05
Non-Matches
06.13.32.123
Author Rating: Not yet rated. ulhas deshmukh
Title Test Details Brazilian phone area code
Expression
^[1-9]\d$
Description
Brazilian phone area code
Matches
11 21 31 33 41
Non-Matches
09 100 1000
Author Rating: Not yet rated. Marcello Turnbull
Title Test Details Brazilian salary format
Expression
^(\d{1}\.){0,1}\d{1,3}\,\d{2}$
Description
Brazilian salary format between 0 and ten thousand with two decimal places
Matches
9.999,99 999,99 99,99 9,99 0,99
Non-Matches
99.999,99 9999,99 9999
Author Rating: Not yet rated. Marcello Turnbull
Title Test Details US Postal Sate Abbrev. Upper and Lower Case
Expression
^([Aa][LKSZRAEPlkszraep]|[Cc][AOTaot]|[Dd][ECec]|[Ff][LMlm]|[Gg][AUau]|[Hh][Ii]|[Ii][ADLNadln]|[Kk][SYsy]|[Ll][Aa]|[Mm][ADEHINOPSTadehinopst]|[Nn][CDEHJMVYcdehjmvy]|[Oo][HKRhkr]|[Pp][ARWarw]|[Rr][Ii]|[Ss][CDcd]|[Tt][NXnx]|[Uu][Tt]|[Vv][AITait]|[Ww][AIVYaivy])$
Description
This is just a simple US states and territories in 2 character regex. Requires valid 2 letter abbreviations. It accepts the Lower and Upper Case Entries.
Matches
MN | tx | Tx
Non-Matches
M | 23 | Alaska | zz
Author Rating: The rating for this expression. Joseph Reilly
Title Test Details Vehicle Registration Series for India
Expression
^([A-Z]{2}\s?(\d{2})?(-)?([A-Z]{1}|\d{1})?([A-Z]{1}|\d{1}))$
Description
this is usefull for Series of Vehicle Number of Indian Transport
Matches
RJ21-3M
Non-Matches
RJ21 3M
Author Rating: The rating for this expression. Jugal Kishor Choudhary
Title Test Details Complete Vehicle Registration Number For Indian Transport Dept.
Expression
^([A-Z]{2}\s?(\d{2})?(-)?([A-Z]{1}|\d{1})?([A-Z]{1}|\d{1})?( )?(\d{4}))$
Description
Ex.- RJ21-CA 1232 PB08-PA 4354
Matches
RJ21-CA 1232
Non-Matches
RJ21-CA1232
Author Rating: Not yet rated. Jugal Kishor Choudhary
Title Test Details Permutations of a character series
Expression
(?!.*([abcde]).*\1)^[abcde]{5}$
Description
Let's say that you have a series of characters "abcde" and you want to match all strings that could be comprised of those characters with each character used exactly once. This could loosely be termed an anagram matcher, although if the string contains duplicate letters it would require modification of this pattern. In the example case we have a string "abcde" and we want to match any permutation of "abcde". Note that the "5" used in the pattern indicates the number of characters specified in the character set "abcde", "5" would still be used if "abcde" would be replaced with "a-e" since there would still be 5 characters in the series. If you are curious about how to require duplicates in the pattern (to match all permutations of "apple" for example) I would use (?=^.*p.*p$)(?!.*([ale]).*\1)^[aple]{5}$
Matches
abcde | dbcae | edcba
Non-Matches
abcbe
Author Rating: Not yet rated. Doug Drudik
Title Test Details Match substrings of string seprated by spaces while keeping substring groups enclosed by certain character(s) together.
Expression
\S*?[\["].*?[\]"]|\S+
Description
Given that you have a string that is comprised characters/words separated by spaces and you want to creates matches of those words/characters but you also have substring groups of words/characters/spaces enclosed in [] and "" that you want treated as a single match, this pattern is what worked for me. Feel free to modify this regex to fit your needs if your string groups are not grouped by [] or "". Please let me know if this doesn't test well for you. ********** Example Test String: 212.183.143.4 - - [03/May/2007:21:03:27 +0100] "GET mp4-amrnb.3gp RTSP/1.0" 200 155527 [RealOnePlayer_s60.26.25.01_21-Jun-2005_13:02:43_epoc_av21_thumb] [3e546ed1-f9b1-11db-eb72-1d98b80ca9f5] [UNKNOWN] 454492 102 47 0 0 [0 0 0 0] [03/May/2007:21:02:38] 192.168.0.2 24245 55 ********** Matches: Matches(0) = "212.183.143.4" Matches(1) = "-" Matches(2) = "-" Matches(3) = "[03/May/2007:21:03:27 +0100]" Matches(4) = ""GET mp4-amrnb.3gp RTSP/1.0"" Matches(5) = "200" Matches(6) = "155527" Matches(7) = "[RealOnePlayer_s60.26.25.01_21-Jun-2005_13:02:43_epoc_av21_thumb]" Matches(8) = "[3e546ed1-f9b1-11db-eb72-1d98b80ca9f5]" Matches(9) = "[UNKNOWN]" Matches(10) = "454492" Matches(11) = "102" Matches(12) = "47" Matches(13) = "0" Matches(14) = "0" Matches(15) = "[0 0 0 0]" Matches(16) = "[03/May/2007:21:02:38]" Matches(17) = "192.168.0.2" Matches(18) = "24245" Matches(19) = "55" ********** ASP Test Code: Set regEx = New RegExp regEx.Global = True regEx.IgnoreCase = True regEx.MultiLine = True teststring = "<<your string>>" regEx.Pattern = "\S*?[\[|\""].*?[\]|\""]|\S+" Set Matches = regEx.Execute(teststring)
Matches
any [strings matched] "any at" all
Non-Matches
^\s*$
Author Rating: Not yet rated. Doug Drudik
Title Test Details Private IP address
Expression
(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^127\.0\.0\.1)
Description
It matches private IP addresses. Private IP addresses (as defined by RFC 1918) are not routable on public Internet. This would help if you want to grant some previlege only to the users from within local network. ***Importnat*** This pattern assumes that the input is a valid IP address. You many need to make sure the input is a valid IP address.
Matches
10.12.0.19 | 172.21.0.23 | 192.168.0.2
Non-Matches
222.12.3.24 | 172.12.0.12
Author Rating: Not yet rated. Mahesh Ramakrishnan
Title Test Details Pattern Title
Expression
(((0[1-9]|[12][0-9]|3[01])([.])(0[13578]|10|12)([.])([1-2][0,9][0-9][0-9]))|(([0][1-9]|[12][0-9]|30)([.])(0[469]|11)([.])([1-2][0,9][0-9][0-9]))|((0[1-9]|1[0-9]|2[0-8])([.])(02)([.])([1-2][0,9][0-9][0-9]))|((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
Usefull for SQL update and insert sentence..
Matches
01.01.2004 | 30.12.2005
Non-Matches
01/01/2004 | 1.1.2004 | 01-01-2004
Author Rating: The rating for this expression. Pavel Rotar
Title Test Details Top-Level Domain Names
Expression
^(http:\/\/)?(www\.)?[a-z0-9][a-z0-9-]{0,61}[a-z0-9](?<gTLD>\.(biz|com|edu|gov|info|int|mil|name|net|org|aero|asia|cat|coop|jobs|mobi|museum|pro|tel|travel|arpa|root))?(?(gTLD)(\.(a[c-gil-oq-uwxz]|b[abd-jmnorstvwyz]|c[acdf-ik-oruvxyz]|d[ejkmoz]|e[ceghrstu]|f[ijkmor]|g[abd-ilmnp-tuwy]|h[kmnrtu]|i[delmnoq-t]|j[emop]|k[eghimnprwyz]|l[abcikr-uvy]|m[acdeghk-z]|n[acefgilopruzc]|om|p[ae-hk-nrstwy]|qa|r[eosuw]|s[a-eg-ortuvyz]|t[cdfghj-prtvwz]|u[agksyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))?|(\.(a[c-gil-oq-uwxz]|b[abd-jmnorstvwyz]|c[acdf-ik-oruvxyz]|d[ejkmoz]|e[ceghrstu]|f[ijkmor]|g[abd-ilmnp-tuwy]|h[kmnrtu]|i[delmnoq-t]|j[emop]|k[eghimnprwyz]|l[abcikr-uvy]|m[acdeghk-z]|n[acefgilopruzc]|om|p[ae-hk-nrstwy]|qa|r[eosuw]|s[a-eg-ortuvyz]|t[cdfghj-prtvwz]|u[agksyz]|v[aceginu]|w[fs]|y[etu]|z[amw])))$
Description
Exact match all the .ccTLD .gTLD and .gTLD.ccTLD names
Matches
http://www.baidu.com www.google.com.us french.net abc.uk china.com.cn http://yahoo.com.li
Non-Matches
usa.co.uk www.china.info.net abc.def.cc
Author Rating: Not yet rated. Pierre Wong
Title Test Details WII Wifi Friend Code Validator
Expression
(?:[0-9]{4}-){3}[0-9]{4})
Description
Validates WII Wifi friend codes
Matches
1234-1234-1234-1234
Non-Matches
12345-1234-1234-1234
Author Rating: The rating for this expression. Brandon Rampersad
Title Test Details Word Limit validation
Expression
(((^\s*)*\S+\s+)|(\S+)){1,5}
Description
This is used to validate a word count of input with an asp.net RegularExpressionValidator.
Matches
Hello, this is five words
Non-Matches
Hello, this is not five words
Author Rating: Not yet rated. Iain wade
Title Test Details Yahoo Search Result Parser
Expression
(<div\sclass="res(\sindent)?">.*?)(<a\s.*?href="(?<URL>.*?)".*?>)(?<Title>.*?</div>)((?<Abstract><div\sclass="abstr">.*?</div>)(?<greenURL><span\sclass=url>.*?</span>).*?</div>)
Description
This expression can be used to parse Yahoo search results.
Matches
go to www.yahoo.com and search for apple pie
Non-Matches
does not apply to this expression
Author Rating: Not yet rated. mangesh paranjape
Title Test Details Pattern Title
Expression
((?<=,\s*\")([^\"]*|([^\"]*\"\"[^""]*\"\"[^\"]*)+)(?=\"\s*,))|((?<=,)[^,\"]*(?=,))
Description
Parse CSV. First You need add to begin and to end of every line comma. Example. You need to get line like ,test,&quot;test1&quot;,..., &quot;testN&quot;, .And after You can parse line.
Matches
John,Doe,120 jefferson st.,Riverside, NJ, 08075 Jack,McGinnis,220 hobo Av.,Phila, PA,09119 "J
Non-Matches
non
Author Rating: Not yet rated. pavel smetanin
Title Test Details internet marketing for local business
Expression
http://www.captainmarketing.com/
Description
We are a SEO, SEM, and online advertising firm based in Los Angeles. Our experts specialize in search engine optimization, Internet marketing, local business listings, and other SEM services.
Matches
Rosanee
Non-Matches
rosanee.webmaster@gmail.com
Author Rating: Not yet rated. Rosanee
Title Test Details <a href="http://www.captainmarketing.com/">internet marketing for local business</a>
Expression
http://www.captainmarketing.com/
Description
We are a SEO, SEM, and online advertising firm based in Los Angeles. Our experts specialize in search engine optimization, Internet marketing, local business listings, and other SEM services.
Matches
Rosanee
Non-Matches
rosanee.webmaster@gmail.com
Author Rating: Not yet rated. Rosanee
Title Test Details internet marketing for local business
Expression
http://www.captainmarketing.com/
Description
<a href="http://www.captainmarketing.com/">internet marketing for local business</a> -We are a SEO, SEM, and online advertising firm based in Los Angeles. Our experts specialize in search engine optimization, Internet marketing, local business listings, and other SEM services.
Matches
Rosanee
Non-Matches
rosanee.webmaster@gmail.com
Author Rating: Not yet rated. Rosanee
Title Test Details Dutch zipcode
Expression
^[1-9][0-9]{3}[ ]?(([a-rt-zA-RT-Z]{2})|([sS][^dasDAS]))$
Description
Dutch zipcode. The non-matching code does not match because lettercombinations SS, SA and SD are not allowed. (historic reasons ?).
Matches
3545CA
Non-Matches
3534 SS
Author Rating: The rating for this expression. Erik
Title Test Details Egyptian Mobile phone
Expression
^[0-9]{11}$
Description
help you to use it in your developing project for egyptians
Matches
01001234567 | 01221234567 | 01111234567
Non-Matches
0101000 | 0108415 | +201112358
Author Rating: Not yet rated. Ahmed Alaa Ahmed
Title Test Details Egyptian Mobile phone
Expression
^[0-9]{11}$
Description
help you to use it in your developing project for egyptians
Matches
01001234567 | 01221234567 | 01111234567
Non-Matches
0101000 | 0108415 | +201112358
Author Rating: Not yet rated. Ahmed Alaa Ahmed
Title Test Details URL finder
Expression
http://\([a-zA-Z0-9_\-]\+\(\.[a-zA-Z0-9_\-]\+\)\+\)\+:\?[0-9]\?\(/*[a-zA-Z0-9_\-#]*\.*\)*?\?\(&*[a-zA-Z0-9;_+/.\-%]*-*=*[a-zA-Z0-9;_+/.\-%]*-*\)*
Description
Find http:// urls. You can replace at the beginning the http:// with a protocol you like as https:// ftp:// etc.
Matches
http://domain.com/ | http://www.domain.com/results?page=2&var=1 | http://www.domain.com/results.html#here | http://www.domain.com:8888/results.html
Non-Matches
/results?page=2 | index.html | www.domain.com
Author Rating: Not yet rated. Demosthenes Koptsis
Title Test Details Cisco IP Phone number - 10 digit number
Expression
^\d{10}$
Description
I needed an expression to allow only a 10 digit number to be entered. No () or dashes or spaces. Cisco IP phones only like the 10 digit number. So here's what I came up with. Very short and simple!
Matches
0123456789, any 10 digit number.
Non-Matches
01245, 01234567899, Less than or greater than 10 digits will fail.
Author Rating: Not yet rated. John Burrey
Title Test Details Arabic Word only or Null String
Expression
^[\u0600-\u06ff\s]+$|[\u0750-\u077f\s]+$|[\ufb50-\ufc3f\s]+$|[\ufe70-\ufefc\s]+$|^$
Description
Arabic Word only or Null String
Matches
محمد احمد
Non-Matches
محمد احمد gjghj
Author Rating: Not yet rated. mhmoud kotb
Title Test Details Number Begin Specfic Number and Lenght 8 or Null
Expression
^[5,6]\d{7}|^$
Description
Number Begin Specfic Number 5 or 6 and Lenght 8 or Null string
Matches
64564654
Non-Matches
24564654
Author Rating: Not yet rated. mhmoud kotb
Title Test Details French Letters
Expression
[a-zà-ïò-öù-ü]+$
Description
This will match all LOWERCASE French Characters encoded in !!!UTF-8 ONLY!!! Add /i to ignore lowercase and match all chars
Matches
éàïìôç
Non-Matches
ÇÀÈ
Author Rating: Not yet rated. ReallyNobody
Title Test Details Price
Expression
\d[\d\,\.]+
Description
This regex will match any price, what so ever, if it's uses a comma as a 1000 seperator, or a dot, and if it uses comma as a decimal seperator or a dot, or if it do not use any seperator what so ever.
Matches
123.00
Non-Matches
1 123123
Author Rating: Not yet rated. sirpadk
Title Test Details Mobile numbers in China
Expression
^(\+86)(13[0-9]|145|147|15[0-3,5-9]|18[0,2,5-9])(\d{8})$
Description
This expression is pretty simple. It validates for mobile phone numbers in mainland China. I needed phone numbers in a certain format for use with an SMS gateway. The formatting is rather strict. Area codes taken from here: http://en.wikipedia.org/wiki/Telephone_numbers_in_China#Mobile_phones
Matches
+8613812345678 | +8613012345678 | +8618212345678
Non-Matches
+8614012345678 | +8615412345678 | +8619012345678
Author Rating: Not yet rated. Scott Crooks
Title Test Details Pakistan Phone Number
Expression
^(\+)?([9]{1}[2]{1})?-? ?(\()?([0]{1})?[1-9]{2,4}(\))?-? ??(\()?[1-9]{4,7}(\))?$
Description
Mathes all mobile and landline numbers in pakistan
Matches
+92 321 7469854 | 923217469857 | 041 2680226
Non-Matches
00124566 | 01 922 745689 | 0000000000
Author Rating: Not yet rated. jahangir shahzad
Title Test Details Canadian Postal Code
Expression
^[ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]{1}\d{1}[A-Za-z]{1}[ ]{0,1}\d{1}[A-Za-z]{1}\d{1}$
Description
Matches the Canadian postal code with or without space between. Also matches uppercase and lower case letters.
Matches
K4A3Z5 | K4A 3Z5 | k4a3z5 | k4a 3z5
Non-Matches
D1G 1T9 | abc def | 123 456 | f1g4t0
Author Rating: Not yet rated. Sheir Ali
Title Test Details Pattern Title
Expression
^([0-1]([\s-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s-./\\])?(\d{3}([\s-./\\])?\d{4}|[a-zA-Z0-9]{7})$
Description
It checks for Valid US Phone numbers. Accepts &amp;amp;amp;quot;.&amp;amp;amp;quot;,Space,\,/,- as delim.
Matches
1.222.333.1234 | 1-223-123-1232 | 12223334444
Non-Matches
1.1.123123.123 | 12-1322-112-31 | 11231321131
Author Rating: Not yet rated. Amit Deshpande
Title Test Details Pattern Title
Expression
^([0-1]([\s-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s-./\\])?([0-9]{3}([\s-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))
Description
USA Alhpanumeric Valid Phone numbers
Matches
1.222.333.1234 | 1-223-123-1232 | 1-888-425-DELL
Non-Matches
1.1.123123.123 | 12-1322-112-31 | 1-800-CALL-DEL
Author Rating: Not yet rated. Amit Deshpande
Title Test Details FAA Tail Number
Expression
^N[1-9][0-9]{0,4}$|^N[1-9][0-9]{0,3}[A-Z]$|^N[1-9][0-9]{0,2}[A-Z]{2}$
Description
FAA Tail Numbers as described here: http://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/special_nnumbers/
Matches
N12345
Non-Matches
N123456
Author Rating: Not yet rated. Eric
Title Test Details Strict Phone
Expression
^\([0-9]{3}\)[0-9]{3}(-)[0-9]{4}
Description
Only matches a single format
Matches
(123)456-7890
Non-Matches
123-456-7890 | (123) 456-7890 | (123)4567890
Author Rating: Not yet rated. Jake
Title Test Details MM/DD/YY(1900 - 2999)
Expression
((0[1-9])|(1[0-2]))\/((0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))/\(([1][9][0-9][0-9])|([2][0-9][0-9][0-9])))
Description
Validated date in the following format: MM/DD/YY from 1900 to 2999
Matches
01/12/2009 | 12/09/1999 | 10/21/2008
Non-Matches
1/10/1800 | 11/3/2006 | 05/32/2010
Author Rating: The rating for this expression. Gillian
Title Test Details 1
Expression
1
Description
1
Matches
1
Non-Matches
1
Author Rating: Not yet rated. kiyong cho
Title Test Details Man Hour Calculation
Expression
^\d*\.?(((5)|(0)|))?$
Description
This validates Man Hour values in projects
Matches
1.5 2 2.5
Non-Matches
1.23 2.3 3.7
Author Rating: Not yet rated. Nilarka Prasanna Das
Title Test Details Pattern Title
Expression
^(\-)?\d*(\.\d+)?$
Description
Matches all positive decimal floating negative/non-negative numbers. Allows empty string.
Matches
0.55 | 21232.00 | -89.20
Non-Matches
asdf | +0.33
Author Rating: Not yet rated. Harshang Pandya
Title Test Details Quebra um endereço em suas partes
Expression
^(?<tipo>.{1,3})\s+(?<endereco>.+),\s+(?<numero>\w{1,10})\s*(?<complemento>.*)$
Description
Quebra um endereço em TIPO LOGRADOURO, ENDERECO, NÚMERO e COMPLEMENTO. Segue norma da Prefeitura Municipal de Curitiba
Matches
Rua José Batista dos Santos, 934 Casa 2|Rua José Batista dos Santos, SN|Av Paulista, 1234567890 Roça Grande
Non-Matches
José Batista dos Santos, 934 Casa 2|Rua José Batista dos Santos, 12345678901|Caixa Postal 5000
Author Rating: Not yet rated. Adislon Carvalho
Title Test Details Pattern Title
Expression
^(?&lt;toplevel&gt;[a-z]+) # Matches the top level MIME type, e.g. 'text' # in 'text/html' /(?&lt;subtype&gt;[a-z]+) # Matches the sub type, e.g. 'html' in 'text/html' (\+(?&lt;formattype&gt;[a-z]+))? # Matches the format type, e.g. 'xml' in # 'application/xhtml+xml' # (Optional part of the MIME type) (; *?charset=&quot;?(?&lt;charset&gt;[a-z0-9\-]+)&quot;?)?$ # matches the 'charset' # parameter in the MIME type, e.g. 'iso-8859-1' # in 'text/html; charset=iso-8859-1' # (Optional part of the MIME type)
Description
Matches MIME Media Types, often to be seen in HTTP 'Content-Type' headers. Extracts the top level type, sub type, format type and charset parameter and assigns them to their respective group in the expression.
Matches
text/html | application/xhtml+xml
Non-Matches
text
Author Rating: Not yet rated. Asbjørn Ulsberg
Title Test Details Select File Accept Arabic and Englesh File name or Folder name
Expression
^[a-zA-Z]:\\(([\w]|[\u0621-\u064A\s])+\\)+([\w]|[\u0621-\u064A\s])+(.jpg|.JPG|.gif|.GIF|.BNG|.bng)$
Description
Select File Accept Arabic and Englesh File name or Folder name
Matches
C:\Documents and Settings\mohamedantar\ملف\My Pictures\صورة.gif
Non-Matches
:\Documents and Settings\mohamedantar\ملف\My Pictures\صورة.gif
Author Rating: Not yet rated. Mohamed Antar Ibrahem
Title Test Details Pattern Title
Expression
^(eth[0-9]$)|(^eth[0-9]:[1-9]$)
Description
regex to validate unix device names (linux). useful for scripts using ifconfig or stuff
Matches
eth0 | eth0:4 | eth4:9
Non-Matches
eth0: | eth0:0 | eth0:1d
Author Rating: The rating for this expression. Joey Brunner
Title Test Details Pattern Title
Expression
\b([\d\w\.\/\+\-\?\:]*)((ht|f)tp(s|)\:\/\/|[\d\d\d|\d\d]\.[\d\d\d|\d\d]\.|www\.|\.tv|\.ac|\.com|\.edu|\.gov|\.int|\.mil|\.net|\.org|\.biz|\.info|\.name|\.pro|\.museum|\.co)([\d\w\.\/\%\+\-\=\&amp;\?\:\\\&quot;\'\,\|\~\;]*)\b
Description
Url matching
Matches
http://210.50.2.215/sd_new/WebBuilder.cgi?RegID=7449046&amp;First=Ok&amp;Upt=Ok&amp;EditPage=3&amp;S
Non-Matches
Hmmmm
Author Rating: The rating for this expression. Johky Cheng
Title Test Details Metric Measurement
Expression
(?<value>([\+-]?((\d*\.\d+)|\d+))(E[\+-]?\d+)?)( (?<prefix>[PTGMkmunpf])?(?<unit>[a-zA-Z]+)?)?
Description
Used for matching measurement expressions with or without scientific notation, with or without a list of known prefixes, and with an option component of a unit. Known limitations include that a measurement term cannot lack a prefix and also start with a letter that could be mistaken for a prefix. For instance, "5 m" is parsed as 5 with a prefix of m, not 5 with a base prefix and a unit of m.
Matches
1 uW, 1 mW, 1 W, 1 m, 1.5 W, .5 W, 5E-12 F, 5 nF
Non-Matches
mW, 5- mW, 5mW
Author Rating: Not yet rated. Sean Duggan
Title Test Details Pattern Title
Expression
^[a-z]+([a-z0-9-]*[a-z0-9]+)?(\.([a-z]+([a-z0-9-]*[a-z0-9]+)?)+)*$
Description
A simple regex which should validate a domain name according to RFC 1035 updated to match domain names with hyphens
Matches
www.domain.com | w123.d42omain.c43om | ww-w.d-omain.com
Non-Matches
1www.domain.com | www.1domain.com | www.domain.com-
Author Rating: Not yet rated. Tinus Norstved
Title Test Details Excel A1 reference style
Expression
^\$?(?(?=[0-9])[0-9]{1,5}:\$?[0-9]{1,5}|[A-Za-z]{1,2}(?(?=:):\$?[A-Za-z]{1,2}|(?(?!(\$?[0-9])):/$[A-Za-z]{1,2}|\$?[0-9]{1,5})(?(?=:):\$?[A-Za-z]{1,2}\$?[0-9]{1,5}|.)))
Description
Matches Excel's A1 reference style. Single Cell, absolute, reletive, mixed, whole row, whole column. Validates it all.
Matches
A10 | A10:A20 | $B$15:E15 | 5:5 | 5:10 | H:H | H:J | $A$10:$A$20
Non-Matches
55 | C: | $HHH:555555 | $C:55
Author Rating: Not yet rated. Mike Sportsman
Title Test Details Pattern Title
Expression
^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$
Description
Matches 99.99% of e-mail addresses (excludes IP e-mails, which are rarely used). The {2,7} at the end leaves space for top level domains as short as .ca but leaves room for new ones like .museum, etc. The ?: notation is a perl non-capturing notation, and can be removed safely for non-perl-compatible languages. See also email.
Matches
joe.tillis@unit.army.mil | jack_rabbit@slims.com | foo99@foo.co.uk
Non-Matches
find_the_mistake.@foo.org | .prefix.@some.net
Author Rating: Not yet rated. J. Washam
Title Test Details asp.net password createuserwizard default
Expression
(?=^.{7,51}$)([A-Za-z]{1})([A-Za-z0-9!@#$%_\^\&\*\-\.\?]{5,49})$
Description
7 alphanumeric 1 non-alphanumeric
Matches
mydemos!te | testingyo#urlive | myn@meforyou
Non-Matches
testing4yourlive | test1ngmore | worknowMMM
Author Rating: Not yet rated. Jorge Arturo Aviles Nuñez (Mexico)
Title Test Details Valid Folder Name
Expression
^[^\\/:*?""<>|.][^\\/:*?""<>|]*(?<!\.)(^[^\\/:*?""<>|]|$)|^$
Description
Regex for valid folder name. 1. Do not allow \ / : * ? " < > | any where in the language (folder) name. 2. Do not allow . at beginning or end of text. '.' can present in middle of text.
Matches
ValidFolder.Name|Folder!@#$%^&()|New Folder
Non-Matches
InvalidFolderName>|InvalidFolder.|Invalid<>Folder
Author Rating: The rating for this expression. Daniel Foo
Title Test Details Total Days of the Year
Expression
^([1-9]|[1-9]\d|[1-2]\d{2}|3[0-6][0-6])$
Description
Limit the inclusion of days of the year, between 1 and 366
Matches
1, 299, 366
Non-Matches
0, 367, 4000
Author Rating: Not yet rated. Vinicius Castro
Title Test Details Upper and Lower
Expression
.*[a-zA-Z]$
Description
This expression will accept only for characters both case(upper and lower)
Matches
lalu | LALU | LAlu
Non-Matches
lalu123 | LALU #$#$ | Lalu$%
Author Rating: The rating for this expression. NILAKANTHA RATH
Title Test Details Date Format
Expression
^(([0-9])|([0-2][0-9])|([3][0-1]))\/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\/\d{4}$
Description
This regular expressions matches dates of the form dd/MMM/yyyy where dd can be 1 or 2 digits long, MMM is a month abbreviation, and yyyy is always 4 digits long.
Matches
1/Feb/2007 | 03/Jun/2007 | 31/Dec/2007
Non-Matches
1/2/2007 | 03/Jun/07 | 31-Dec-2007
Author Rating: Not yet rated. Ken
Title Test Details DD/MMM/YYYY
Expression
^(?:((31\/(Jan|Mar|May|Jul|Aug|Oct|Dec))|((([0-2]\d)|30)\/(Jan|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))|(([01]\d|2[0-8])\/Feb))|(29\/Feb(?=\/((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
Matches dates in the form of DD/MMM/YYYY. It also handles leap years. Days are 2 digits; months are case sensitive with first character upper-case and next 2 characters lower-case; year is 4 digits.
Matches
01/Mar/2007 | 16/Dec/2007 | 29/Feb/2008
Non-Matches
1/Mar/2007 | 16/Dec/07 | 29/Feb/2007
Author Rating: Not yet rated. Ken
Title Test Details Pattern Title
Expression
(?<=(?:\\))[a-zA-Z0-9\-\s_]*(?=(?:\.\w*$))
Description
WINDOWS ONLY Useful to get the filename whenever you get it from anysource, recommended for non-critical filename-dependant applications.
Matches
c:\program files\anyfolder\file.xls | c:\program files\any.folder\file with weird name_.xls
Non-Matches
c:\program files\anyfolder\file*.xls | c:\program files\anyfolder\file?.xls | c:\program files\anyfo
Author Rating: Not yet rated. Jose Paez
Title Test Details Html Hex colors in Php
Expression
/#([1-9]){2}([1-9]){2}([1-9]){2}/
Description
Replace with: #$1$2$3 This is used to find hex colors (#665533) and make them into shorthand if possible (#653)
Matches
#665544, #444444
Non-Matches
#435643, #434343
Author Rating: Not yet rated. David Hobs
Title Test Details CSV Parser
Expression
((?:[^",]|(?:"(?:\\{2}|\\"|[^"])*?"))*)
Description
Very simple (but very useful!) regex to split CSV files. It does not drop the commas - you have to do that manually. Quotes are dealt with properly and escaped quotes are ignored. Matches from sample:this is ;a;"line,\"in\"a";csv;file
Matches
this is ,a,"line,\"in\",a",csv,file
Non-Matches
"
Author Rating: The rating for this expression. Alex Forencich
Title Test Details Query String Ampersand Replacer
Expression
&(?!amp;)
Description
Used to replace lone ampersands in query strings with their &amp;amp; counterparts.
Matches
var1=val1&amp;var2=test
Non-Matches
var1=val1&amp;amp;var2=test
Author Rating: Not yet rated. Alex Forencich
Change page:   |    Displaying page 27 of 34 pages; Items 2601 to 2700

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