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

Change page:   |    Displaying page 27 of 34 pages; Items 2601 to 2700
Title Test Details Positive Decimals with Commas
Expression
(^(\d|,)*\.?\d*[1-9]+\d*$)|(^[1-9]+(\d|,)*\.\d*$)|(^[1-9]+(\d|,)*\d*$)
Description
This expression will match all positive numbers that contain decimals and commas.
Matches
2,000.00, 2,000, .0020, 100, 100.00
Non-Matches
0, 0.00, -100.00, -0, -2000.00
Author Rating: The rating for this expression. Ryan Milbrath
Title Test Details International Phone Numbers
Expression
^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$
Description
Allows for all kinds of generic international phone numbers, including that of the USA, may include () around area code as well as period, dash, space or nothing seperating numbers. International code needs to be seperated from rest by period, space or dash and my be prefixed with plus. Not overly restrictive but limits size and repetition of codes
Matches
2155552527|(215) 555 2527|215.555.2527|+1 215-555-2527|+1.215.555.2527
Non-Matches
+1215.555.2527|321654|+11+27 215-555-2527
Author Rating: Not yet rated. Renso Hollhumer
Title Test Details Drop first subdomain from domain name
Expression
^\w+\.((?:\w+\.)+\w+)$
Description
Drops the first subdomain from a domain name with at least one subdomain. Fails if the domain does not contain a subdomain.
Matches
www.google.com | www.wave.google.com | as.vcu.acadia.memco.edu
Non-Matches
google.com | microsoft.com | memco.edu
Author Rating: Not yet rated. Josh Brown
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 Currency with Currency Code Prefix
Expression
^([A-Z]{0,3})?[ ]?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$
Description
Matching currency entry with upto 3 letter currency code as prefix
Matches
USD2000.20, USD 2000, INR 150.150, QR 150, 15000
Non-Matches
usd2000.20, usd 2000, inr 2000, $250
Author Rating: Not yet rated. Ullaskumar V
Title Test Details Email separated by semicolon (;) -- Email separados por ponto e vírgula(;)
Expression
"^([a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})){1}(;[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,}))*$"
Description
Expression for validation of one or more emails separated by semicolon(;) -- Expressão para validação de um ou mais emails separados por ponto e vírgula(;)
Matches
renanxr3@hotmail.com;renanxr2@hotmail.com
Non-Matches
[renanxr3@hotmail.com; renanxr2@hotmail.com;] [renanxr3@hotmail.com renanxr2@hotmail.com;]
Author Rating: The rating for this expression. Renan Nucci
Title Test Details Valid Medicare HIC number
Expression
(?![A-Z](\d)\1{5,})(^[A-Z]{1,3}(\d{6}|\d{9})$)|(^\d{9}[A-Z][0-9|A-Z]?$)
Description
Matches valid Medicare HIC number according to CMS specifications
Matches
H123456 | XYZ123456789 | 123456789B
Non-Matches
H123 | H999999 | H1234XB
Author Rating: The rating for this expression. Brian Thiessen
Title Test Details Space Delimited Format (SDF) Parser - backslash escape
Expression
/("(\\["\\]|[^"])*("|$)|\S)+/g
Description
Intended for single line. JavaScript match() method (or equivalent) creates an array of values each of which is either an unquoted string of non-whitespace chars, or a quoted string which can contain whitespace, escaped quotes (\"), escaped escaped chars (\\), or be empty (""). Splits (only) on whitespace. (Does not split on opening or closing quotes.) An unclosed quote matches all until end of input. The Matching Examples are ready for enclosure in single quotes. Output of Matching Example 1: [0]=a [1]=" b b " [2]=c\"c [3]="" [4]="\"" [5]="\\" Output of Matching Example 2: [0]=a" a\""a"a" [1]=" b \" b
Matches
a " b b " c\\"c "" "\\"" "\\\\" | a" a\\""a"a" " b \\" b
Non-Matches
only strings with <1 non-whitespace char
Author Rating: Not yet rated. Brian \S\s
Title Test Details Space Delimited Format (SDF) Parser - double quote escape
Expression
("(?!")(""|[^"])*("|$)|\S)+/g
Description
Intended for single line. JavaScript match() method (or equivalent) creates an array of values each of which is either an unquoted string of non-whitespace chars, or a quoted string which can contain whitespace, escaped quotes (""), escaped escaped chars ("""), or be empty (""). Splits (only) on whitespace. (Does not split on opening or closing quotes.) An unclosed quote matches all until end of input. The Matching Examples are ready for enclosure in single quotes. Output of Matching Example 1: [0]=a [1]=" b b " [2]=c""c [3]="" [4]=""d"" Output of Matching Example 2: [0]=a" a"""a"a" [1]=" b "" b
Matches
a " b b " c""c "" ""d"" | a" a"""a"a" " b "" b
Non-Matches
only strings with <1 non-whitespace char
Author Rating: Not yet rated. Brian \S\s
Title Test Details Pattern Match(For COBOL's Move Verb)
Expression
(?i)\s*MOVE\s+\w+(\-\w+)*\s+TO\s+\w+(\-\w+)*
Description
This is Regular Expression for COBOL's Move Verb. eg.: MOVE WS-IDFD9 TO DF-FD-FF Here in eg. variables have hyphen instead of underscore.
Matches
MOVE WS-IDFD9 TO DF-FD-FF
Non-Matches
MOVE WS-IDFD9 TO DF*dfd*
Author Rating: Not yet rated. Yogesh R. Bari
Title Test Details Text File Parser - splits on unquoted \n - backslash escape - \r\n okay
Expression
/^("(\\["\\]|[^"])*"|[^\n])*(\n|$)/gm
Description
JavaScript match() method (or equivalent) creates an array of lines from a text file. This pattern handles lines ending with \r\n as well as \n at the expense of including the line-ending chars in the output. The Matching Examples are ready for enclosure in single quotes. Output from Matching Example 1: [0]=a " b [\n] " c [\n] [1]= Line2... [\n] [2]= Line3... Output from Matching Example 2: [0]=a " b [\r][\n]" c [\r][\n] [1]= Line2... [\r][\n] [2]= Line3...
Matches
a " b \n " c \n Line2... \n Line3... | a " b \r\n " c \r\n Line2... \r\n Line3...
Non-Matches
matches all
Author Rating: Not yet rated. Brian \S\s
Title Test Details Space Delimited Format (SDF) Parser - backslash escape - splits on whitespace and opening & closing quotes
Expression
/"(\\["\\]|[^"])*("|$)|(\\["\\]|[^\s"])+/g
Description
Intended for single line. JavaScript match() method (or equivalent) creates an array of values each of which is either an unquoted string of non-whitespace chars, or a quoted string which can contain whitespace, escaped quotes (\"), escaped escaped chars (\\), or be empty (""). Splits on whitespace AND splits on opening and closing quotes. An unclosed quote matches all until end of input. The Matching Examples are ready for enclosure in single quotes. Output of Matching Example 1: [0]=a [1]=" b b " [2]=c\"c [3]="" [4]="\"" [5]="\\" Output of Matching Example 2: [0]=a [1]=" b\"" [2]=c [3]="d" [4]=" e \" f
Matches
a " b b " c\\"c "" "\\"" "\\\\" | a" b\\""c"d" " e \\" f
Non-Matches
only strings with <1 non-whitespace char
Author Rating: Not yet rated. Brian \S\s
Title Test Details Space Delimited Format (SDF) Parser - double quote escape - splits on whitespace and opening & closing quotes
Expression
/"(?!")(""|[^"])*("|$)|(("")+|[^\s"])+/g
Description
Intended for single line. JavaScript match() method (or equivalent) creates an array of values each of which is either an unquoted string of non-whitespace chars, or a quoted string which can contain whitespace, escaped quotes (""), escaped escaped chars ("""), or be empty (""). Splits on whitespace AND splits on opening and closing quotes. An unclosed quote matches all until end of input. The Matching Examples are ready for enclosure in single quotes. Output of Matching Example 1: [0]=a [1]=" b b " [2]=c""c [3]="" [4]="""d""" Output of Matching Example 2: [0]=a [1]=" b""" [2]=c [3]="d" [4]=" e "" e
Matches
a " b b " c""c "" """d""" | a" b"""c"d" " e "" e
Non-Matches
only strings with <1 non-whitespace char
Author Rating: Not yet rated. Brian \S\s
Title Test Details Email Address
Expression
[a-z0-9]+([-+._][a-z0-9]+){0,2}@.*?(\.(a(?:[cdefgilmnoqrstuwxz]|ero|(?:rp|si)a)|b(?:[abdefghijmnorstvwyz]iz)|c(?:[acdfghiklmnoruvxyz]|at|o(?:m|op))|d[ejkmoz]|e(?:[ceghrstu]|du)|f[ijkmor]|g(?:[abdefghilmnpqrstuwy]|ov)|h[kmnrtu]|i(?:[delmnoqrst]|n(?:fo|t))|j(?:[emop]|obs)|k[eghimnprwyz]|l[abcikrstuvy]|m(?:[acdeghklmnopqrstuvwxyz]|il|obi|useum)|n(?:[acefgilopruz]|ame|et)|o(?:m|rg)|p(?:[aefghklmnrstwy]|ro)|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|t(?:[cdfghjklmnoprtvwz]|(?:rav)?el)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw])\b){1,2}
Description
SUMMARY: Very selective email address Regex USE: intended for finding emails in text. DETAILS: regex is terminated by a match for all possible Top-Level-Domains, so regex can even differentiate the terminating end of the email string from other text (including letters)
Matches
bob.wintson@hotmail.com bob.wintson@middlesex.lenovix.com bob.c.wintson@mysite.middlesex.hotmail.com bob_c_wintson@mysite.middlesex.hotmail.com
Non-Matches
bob_d_c_wintson@mysite.middlesex.hotmail.com bob_c_wintson@mysite.middlesex.hotmail.cop
Author Rating: The rating for this expression. Daniel Collicott
Title Test Details Text File Parser - splits on unquoted \n - backslash escape
Expression
/^("(\\["\\]|[^"])*"|[^\n])*$/gm
Description
JavaScript match() method (or equivalent) creates an array of lines from a text file. This pattern only handles lines ending with \n, not \r\n. The Matching Examples are ready for enclosure in single quotes. Output from Matching Example 1: [0]=a " b [\n] " c [1]= Line2... [2]= Line3... Output from Matching Example 2: [0]=a " b [\r][\n]" c [\r] [1]= [2]= Line2... [\r] [3]= [4]= Line3...
Matches
a " b \n " c \n Line2... \n Line3... | a " b \r\n " c \r\n Line2... \r\n Line3...
Non-Matches
matches all
Author Rating: Not yet rated. Brian \S\s
Title Test Details Currency w/ Symbols
Expression
^\p{Sc}?[A-Z]{0,3}?[ ]?(\d{1,3})(\.|\,)(\d{0,4})?[ ]?\p{Sc}?[A-Z]{0,3}?$
Description
Currency test for currency symbols and up to three char leading/trailing string
Matches
$123.1234 | EUR 123,12 | 123.24 USD
Non-Matches
@ 123.24 | EURO 123,12 | ABC
Author Rating: Not yet rated. David Parkin
Title Test Details diff line count
Expression
hg diff --nodates | egrep -e "---" -v | egrep -e "^-" -c hg diff --nodates | egrep -e "\+\+\+" -v | egrep -e "^\+" -c
Description
does a mercurial diff and counts the lines removed/added.
Matches
- removed this line | - | - ...| + added this line
Non-Matches
+++ | asdf | --- a/file/here.tt
Author Rating: Not yet rated. Justin Faust
Title Test Details Valida email
Expression
(([\w-]+(?:\.[\w-]+)*)@(timbrasil.com.br))*
Description
valida email
Matches
teste@timbrasil.com.br
Non-Matches
aaa
Author Rating: Not yet rated. Thiago Moreira
Title Test Details VIN - Vehicle Identification Number for USA
Expression
^[^iIoOqQ'-]{10,17}$
Description
Validates US VIN. It could be between 10 and 17 character in length and should never contain i, l, o, O, q, Q, ' or -.
Matches
12345awertasfggr
Non-Matches
12345qwertasfggr
Author Rating: Not yet rated. Igor Werner
Title Test Details Comma & semi-colon separated email validation
Expression
^(?:(?:[\w\.\-_]+@[\w\d]+(?:\.[\w]{2,6})+)[,;]?\s?)+$
Description
I am using a repeating section to provide multi email check wherein the separator can be either a comma or a semi-colon. whitespaces are allowed after a delimiter.
Matches
elvis@mywebsite.com | elvis@mywebsite.com;me@mywebsite.com | elvis@mywebsite.com,me@mywebsite.com, elvis.furtado@mywebsite.net | newyork@sydneyUniv.gov.us,elvis@mywebsite.com;me@mywebsite.com
Non-Matches
elvis@@mywebsite.com | elvis@@mywebsite.c | elvis @mywebsite.com.in.org
Author Rating: The rating for this expression. Elvis Furtado
Title Test Details DK Street Address (Basic)
Expression
^((.){1,}(\d){1,}(.){0,})$
Description
Does a very basic validation on Danish street addresses. It ensures that the format "Address No" is honored, but also allows any char to be put after the address. This is to ensure additions like floor, and which door it is. Ex. "Addrees No Floor LeftDoor." Enjoy!
Matches
Teststreet 32 | Tørststræde 4 | Tørststræde 24 1. tv
Non-Matches
Tørststræde | 2 Tørststræde
Author Rating: Not yet rated. Mikkel Petersen
Title Test Details Integer/Float/Currency
Expression
(\d+)([,|.\d])*\d
Description
Matches any integer, float or currency.
Matches
11 11.00 1,243,44.00 343.333
Non-Matches
abcd 324bddf
Author Rating: Not yet rated. Sriram Viswanathan
Title Test Details Parse Windows Filename / Pathname (simple version)
Expression
/(?:(.):)?(?:(.*)\\)?(?:(.*)\.)?(.*)/
Description
Does not validate. For parsing a file name known to be valid. Handles periods in the file name. Does not include terminating characters in the output, as preferred. Javascript exec() method produces the following array elements: [1]=drive; [2]=path; IF extension exists THEN [3]=filename; [4]=extension; ELSE [3]=undefined; [4]=filename. (To avoid the awkwardness, see "Parse Windows Filename (complex version)." Matching Example 1 output: [1]=d [2]=\p.p\p [3]=f.f [4]=e Matching Example 2 output: [1]=[undefined] [2]=[empty string] [3]=[undefined] [4]=f Matching Example 3 output: [1]=undefined [2]=undefined [3]=f [4]=e
Matches
'd:\\p.p\\p\\f.f.e' | '\\f' | 'f.e'
Non-Matches
matches all
Author Rating: Not yet rated. Brian \S\s
Title Test Details For checking 1 email id
Expression
^\s*(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@(\w+\.)+[A-Za-z]{2,5}$
Description
Created by me.It works in almost all the normal cases.
Matches
afae@erew.com, rfew@fwe.co.in, dqweqw@fwertfwe.museum
Non-Matches
werew@rtre.c, efgtre@wtg., .wer@rtre.cn, were..wrfw@wewer.com, eewq.weqw.@ewrew.com, spaces not at the beginning
Author Rating: Not yet rated. AJ
Title Test Details For checking 1 or more email ids
Expression
"^\s*((([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@(\w+\.)+[A-Za-z]{2,5}[?= ]?[?=,;]?[?= ]?)+?$"
Description
Created by me.Allows for checking 1 mail id or more.If more than 1 it should be separated by a , or ; and or space.
Matches
Ignore the brackets - (rfew@fwe.cn,afae@erew.com) (rfew@fwe.cn;afae@erew.com) (rfew@fwe.cn afae@erew.com) (rfew@fwe.cn , afae@erew.com) (rfew@fwe.cn ;afae@erew.com)
Non-Matches
(.wer@rtre.cn) (gffg d@sdgsdg.com)
Author Rating: Not yet rated. AJ
Title Test Details Parse Windows Filename / Pathname (complex version)
Expression
/(?:(.):)?(?:(.*)\\)?((?:[^.]|.(?=[^.]*\.))*)(?:\.(.*))?/
Description
Does not validate. For parsing a file name known to be valid. Handles periods in the file name. Does not include terminating characters in the output, as preferred. Javascript exec() method produces the following array elements: [1]=drive; [2]=path; [3]=filename; [4]=extension; Matching Example 1 output: [1]=d [2]=\p.p\p [3]=f.f [4]=e Matching Example 2 output: [1]=[undefined] [2]=[empty string] [3]=f [4]=[undefined]
Matches
'd:\\p.p\\p\\f.f.e' | '\\f'
Non-Matches
matches all
Author Rating: Not yet rated. Brian \S\s
Title Test Details Space Delimited Format (SDF) Parser - ' or " mixed - backslash escape - splits on whitespace and opening & closing quotes
Expression
/"(\\["\\]|[^"])*("|$)|'(\\['\\]|[^'])*('|$)|(\\["'\\]|[^\s"'])+/g
Description
Intended for single line. JavaScript match() method (or equivalent) creates an array of values each of which is either an unquoted string of non-whitespace chars, or a quoted string which can contain whitespace, escaped quotes (\' or \"), escaped escaped chars (\\), or be empty ('' or ""). Splits on whitespace AND splits on opening and closing quotes. An unclosed quote matches all until end of input. The Matching Example is ready for enclosure in single quotes. Output of Matching Example: [0]=a [1]=' b"\'b ' [2]='b2' [3]="c\"'c" [4]="d
Matches
a \' b"\\\'b \'\'b2\' "c\\"\'c" "d
Non-Matches
only strings with <1 non-whitespace char
Author Rating: Not yet rated. Brian \S\s
Title Test Details Text File Parser - splits on unquoted \n - ' or " mixed - backslash escape - \r\n okay
Expression
/^("(\\"|[^"])*"|'(\\'|[^'])*'|[^\n])*(\n|$)/gm
Description
JavaScript match() method (or equivalent) creates an array of lines from a text file. This pattern handles lines ending with \r\n as well as \n at the expense of including the line-ending chars in the output. The Matching Example is ready for enclosure in single quotes. Output from Matching Example: [0]=a " b [\n] " 'c[\n]' [\n] [1]= "a \" ' " b 'c " \' ' [\n] [2]= Line3...
Matches
a " b \n " \'c\n\' \n "a \\" \' " b \'c " \\\' \' \n Line3...
Non-Matches
matches all
Author Rating: Not yet rated. Brian \S\s
Title Test Details Windows path
Expression
^((?:(?:[a-zA-Z]:)|\\)\\)?((?:\.\.?\\)|(?:[^\0-\31<>:"/\\|?*]+(?<![ .])\\))*([^\0-\31<>:"/\\|?*]+(?<![ .]))?$
Description
I've come to this expression according with (most of) the naming conventions provided by MS in this page: http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#naming_conventions Any corrections or comments will be much appreciated NOTE: thanks to Ultrapico for freely distributing Expresso (http://www.ultrapico.com/Expresso.htm)
Matches
C:\Program files\Ultrapico\Expresso\ | C:\Program files\Ultrapico\Expresso\Expresso.exe | \\myserver\myfolder | \\myserver\myfolder\ | \\myserver\.myfolder | \\myserver\myfolder\myfile.txt | ..\here\..\here\..\here\.\this.txt
Non-Matches
C:\Program files\Ultrapico\Expresso.\ | \\myserver\myfolder. | do_not_end_names_with_SPACE
Author Rating: Not yet rated. flyontheweb
Title Test Details TDPE Puzzle Answer
Expression
(?<=<\w+ )(\w+-*\w*=[^>]+\s?)(?=>)
Description
The puzzle answer to save the day! This is the hint clue answer you need to solve the toughest developer puzzle ever TDPE. (Puzzle level clue hint answer solution solve)
Matches
TDPE
Non-Matches
Other Stuff
Author Rating: Not yet rated. Toughest Developer Puzzle Ever TDPE
Title Test Details email regular expressions
Expression
^[A-Za-z0-9](\.[\w\-]|[\w\-][\w\-])(\.[\w\-]|[\w\-]?[\w\-]){0,30}[\w\-]?@[A-Za-z0-9\-]{3,63}\.[a-zA-Z]{2,6}$
Description
All emails listed below are to be created and You can try all of them on the domain name listed!
Matches
a12.__.--@live.com | info@1234.com
Non-Matches
1test@gmail.com | test.@yahoo.com | test@test_test.com
Author Rating: The rating for this expression. mehdi ghasemi
Title Test Details Open Close Time
Expression
^(([0-1][0-9]|2[0-3])[0-5][0-9]\-([0-1][0-9]|2[0-3])[0-5][0-9]|[C|c]losed)$
Description
This allows for a single line input of open and close times (for a store/office).
Matches
0700-1530 | 1130-2310 | Closed | closed | 0000-2359
Non-Matches
0700 | Not open | 0700-2400 | 3159-0761
Author Rating: Not yet rated. J. Matthew Phipps
Title Test Details 1-12
Expression
\b(?:1[0-2]?|[2-9])\b
Description
you can enter number between 1 to 12
Matches
1,2..,10,11,12
Non-Matches
0,13,14...,qqq,aaa,a12,
Author Rating: Not yet rated. ajaidas
Title Test Details Telephone and Mobile number for the Maltese Islands
Expression
/(00356)?(99|79|77|21|27|22|25)[0-9]{6}/g
Description
Telephone and Mobile number for the Maltese islands including an optional 00356 for country code
Matches
0035621223344 | 0035679776655 | 99887766
Non-Matches
35621223344 | 88776655 | 0035655
Author Rating: The rating for this expression. William Farrugia
Title Test Details Pattern Match(For Date)
Expression
\d{1,2}(/|-)\d{1,2}(/|-)\d{2,4}
Description
This is regular expression for date. eg.:02/06/2010 2/6/10 02-06-2010 2-6-10
Matches
02/06/2010
Non-Matches
02 June 2010
Author Rating: The rating for this expression. Yogesh R. Bari
Title Test Details Root web path
Expression
^\.{0,2}[\/\\]
Description
Will match any web path that's supposed to start in the root (e.g. with "/" in front of it.
Matches
./some/file.html \this\is\a.file ../blah/blah
Non-Matches
path\in\current.folder
Author Rating: Not yet rated. Chris Vandevelde
Title Test Details powerfull username
Expression
[A-Za-z](\.[A-Za-z0-9]|\-[A-Za-z0-9]|_[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9])(\.[A-Za-z0-9]|\-[A-Za-z0-9]|_[A-Za-z0-9]|[A-Za-z0-9])*
Description
this expression is one of the best username regular expressions
Matches
a.f | joe | mehdi2_ghasemi | mr-green123
Non-Matches
a._f | 1mehdi | ab | mehdi..ghasemi | mehdi_
Author Rating: The rating for this expression. mehdi ghasemi
Title Test Details Unsigned integer and double
Expression
^\d+?(\.\d+)?$
Description
This expression matches the integer or double. A double is separated by the dot.
Matches
0 0.1 1 1.0 1000.1 1.111
Non-Matches
.1 1. -1 ...
Author Rating: Not yet rated. Alexei
Title Test Details Single Email Match - current June 2010
Expression
^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)$
Description
Matches email addresses. Based on expression at regular-expressions.info/email.html modified to include all top-level domains (TLD)listed on wikipedia as of June 2010. Needs to be updated as new TLDs are added. Known Issues: * IP Addresses will not validate * Double "at" symbols, e.g. email@em@il.com slip by this regex. Would welcome improvements by a regex ninja.
Matches
email@email.com | email@email.cn | e_m81l&em%'l@eMail.MUSEUM | email@em@il.com
Non-Matches
email@com | email@email.con | email@email.museet | email@192.0.0.1
Author Rating: Not yet rated. Brent Thomas
Title Test Details Identify relative urls
Expression
(src|href|action)\s*=\s*('|"|(?!"|'))(?!(http:|ftp:|mailto:|https:|#))
Description
After hitting little snags through the years here is a [WIP] for replacing relative links. Notice that it considers whitespace between the src,href and the equal sign, it also considers the links may not have any quotes around them. It negates urls that start with http,ftp,link anchors, https and mailto.
Matches
href=" src = "pa href='../
Non-Matches
href="mailto: href="mailto: src='ftp:
Author Rating: Not yet rated. Esteban Smits
Title Test Details International & Domestic Phone Numbers with Ext
Expression
^([\+][0-9]{1,3}([ \.\-])?)?([\(]{1}[0-9]{3}[\)])?([0-9A-Z \.\-]{1,32})((x|ext|extension)?[0-9]{1,4}?)$
Description
Somewhat conservative expression for evaluating phone numbers. Based off ideas found at http://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation this allows country codes, with or without the + symbol, area codes surrounded by parenthesis (or not) and numbers delimited by spaces, periods or dashes. You'll want to independently test for string length based on your needs.
Matches
(123)456-7890 | (123)456-7890 x123 | +1 (123)456-7890 | 12 3456 789 0 x1234 | (123)456-7890x123 |(123)456-7890ext123 | (123)456-7890 extension123 | 123.456.7890 | 1234567890 | 1234567 | 12 34 56 78 90 | 12 3 4567 890123 x4567 | +12 3456 7890 | +12 34 56 7890 | +12 3456 7890 | +12 34567890
Non-Matches
(123)456-7890 x 123 | 123.45.6.78+90
Author Rating: Not yet rated. Brent Thomas
Title Test Details Date
Expression
^(0?\d|1[012])\/([012]?\d|3[01])\/(\d{2}|\d{4})$
Description
This is the US date expression. It's very flexible on omitting numbers. $1 = month $2 = day $3 = year
Matches
1/1/10 , 12/12/2010, 01/01/2010
Non-Matches
1JAN10
Author Rating: Not yet rated. Dusko Vuksanovic
Title Test Details DOCTYPE
Expression
\<\!doctype\s+(([^\s\>]+)\s+)?(([^\s\>]+)\s*)?(\"([^\/]+)\/\/([^\/]+)\/\/([^\s]+)\s([^\/]+)\/\/([^\"]+)\")?(\s*\"([^\"]+)\")?\>
Description
Check and parse a DOCTYPE tag elements: (topElement, availability, registration, organization, type, label, language, url)
Matches
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | <!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">
Non-Matches
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | <HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd"
Author Rating: Not yet rated. Dean Dal Bozzo
Title Test Details Multiple Email Addresses
Expression
^([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,})))(;[ ]?[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,})))*$
Description
Matches a semi-colon-delimited string of email addresses. Delimiter can include a space after the semi-colon. Based on/thanks to David Huyck's pattern, with the domain extension opened up and specific extensions removed.
Matches
jdude@yahoo.com | jdude@yahoo.com; janedoe@hotmail.com | jdude@yahoo.com; janedoe@hotmail.com; billybob@127.0.0.1
Non-Matches
jdudeyahoo.com | jdude@yahoo.com or janedoe@hotmail.com | jdude@yahoo.com, janedoe@hotmail.com, billybob@127.0.0.1
Author Rating: Not yet rated. John C. Pratt
Title Test Details RFC5322 spec'd email validation
Expression
((((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?[+A-Za-z0-9!#$%&'*/=?\^_`{}|\~-]+(\.[+A-Za-z0-9!#$%&'*/=?\^_`{}|\~-]+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?|(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?\x22((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(([\x21\x23-\x5b\x5d-\x7e]|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f])|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))))*(((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\x22(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\
Description
I built this from the ABNF grammars from necessary pieces from RFC2822, 1034, 5234, and based mainly on 5322 in order to build a complete grammar to make the regex. I learned compiler technology in college. unfortunately, this web site truncates the regex.
Matches
nobody@nowhere.com
Non-Matches
nobody@
Author Rating: Not yet rated. Jim Michaels
Title Test Details RFC5322 spec'd bracketed email validation
Expression
((((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?\<((((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?[+A-Za-z0-9!#$%&'*/=?\^_`{}|\~-]+(\.[+A-Za-z0-9!#$%&'*/=?\^_`{}|\~-]+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?|(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)*(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(\(((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21-\x27\x2a-\x5b\x5d-\x7e]|((\\([\x01-\x09\x0b\x0c\x0e-\x7f]|\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|\\(\x00|[\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x0a|\x0d))|))*)+((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?\))+)|((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*)))?\x22((((([\x20\x09]*\x0d\x0a)?[\x20\x09]+)|[\x20\x09]+(\x0d\x0a[\x20\x09]+)*))?(([\x21\x23-\
Description
RFC5322 is the new email spec that replaces 2822 which replaces 822. I built this directly from the [A]BNF grammars from RFC5322, 2822, 1034, 5234. the biggest problem I ran into was the fact that regex can't do recursion, so I replaced it with repetition. unfortunately, this web site truncates the regex.
Matches
<nobody@nowhere.com>
Non-Matches
nobody@nowhere.com
Author Rating: Not yet rated. Jim Michaels
Title Test Details Pattern Title
Expression
^09(73|74|05|06|15|16|17|26|27|35|36|37|79|38|07|08|09|10|12|18|19|20|21|28|29|30|38|39|89|99|22|23|32|33)\d{3}\s?\d{4}
Description
Validates a Philippine mobile phone number without International code. Includes country's six area codes for mobile phones: Express Telecom, Globe Telecom, Next Mobile, Red Mobile, Smart Communications and Sun Cellular
Matches
09171234567 | 0905 123 4567
Non-Matches
+639111111 | 09011234567 | 0915 1234 23 2
Author Rating: The rating for this expression. Abram John A. Limpin
Title Test Details UK Date Format
Expression
^(([0-9])|([0-2][0-9])|(3[0-1]))\/(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$
Description
Simple UK Date Format dd/mm/yy or dd/mm/yyyy.
Matches
30/10/1967 30/10/67 1/1/1967
Non-Matches
32/12/1967 30/13/67
Author Rating: Not yet rated. Ben McInerney
Title Test Details Date Time Group (DTG)
Expression
^(3[0-1]|2[0-9]|1[0-9]|0[1-9])(0[0-9]|1[0-9]|2[0-3])([0-5][0-9])\sUTC\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s[0-9]{2}$
Description
In military messages and communications (e.g. on naval charts, or maps showing troop movements) the format is DDHHMMZ Mon YY, so for instance, "271545Z FEB 08" represents 15:45 Zulu time (which is to say UTC) on the 27th of February, 2008. For Radio Navigational Warnings (RNWs), the international format is slightly different, using the explicit UTC text instead of the Zulu character, becoming "DDhhmm UTC Jun YY". E.g. "240923 UTC Jun 10" is "9:23am on 24th June 2010".
Matches
312359 UTC Jun 99
Non-Matches
322567 UTC June 1999
Author Rating: Not yet rated. Ben McInerney
Title Test Details Email Address
Expression
^[\w]+[-\.\w]*@[-\w]+\.[a-z]{2,6}(\.[a-z]{2,6})?$
Description
@ Before you can have underlined, connection, point character, @there are three points after the characters are not allowed
Matches
abc@cde.com | abd@def.com.cn | a2b_cd3-2fg.ss@a2bd5_sd-mbv.com.cn
Non-Matches
abc@ccddme.my.com.cn
Author Rating: Not yet rated. carpinteyrostv
Title Test Details Uri
Expression
[a-z]{3,4}s?:\/\/[-\w.]+(\/[-.\w%&=?]+)*
Description
Optional host header that contains as many query strings
Matches
http://www.regexlib.com/add.aspx?name=cqczt&password=null | https://www.regexlib.com/add.aspx?name=cqczt&password=null | ftp://www.regexlib.com/add.aspx?name=cqczt&password=null
Non-Matches
http://www.regexlib.com/add.aspx?name=cqczt;password=null ,age=99
Author Rating: Not yet rated. carpinteyrostv
Title Test Details UK Vehicle Registration (inc. Northern Ireland)
Expression
^([A-HJ-PR-Y]{2,2}[056][0-9]\s?[A-HJ-PR-Y]{3,3})$|^([A-HJ-NP-Y]{1,3}[0-9]{2,3}?\s[A-Z]{3,3})$|^([A-Z]{1,3}\s?[0-9]{1,4}([A-Z]{1,1})?)$|^([0-9]{4,4}[A-Z]{1,3})$|^([A-Z]{1,2}\s?[0-9]{1,4})$|^([A-Z]{2,3}\s?[0-9]{1,4})$|^([0-9]{1,4}\s?[A-Z]{2,3})$
Description
The regular expression above will validate a UK Vehicle Reg number according to the following criteria: Pre 1932 XX 9999 - 1 or 2 letters followed by 1 to 4 numbers 1932 - 1963 XXX 999 - 1 to 3 letters followed by 1 to 3 numbers 9999 XXX - 4 numbers followed by 1 to 3 letters 1962 - 1982 XXX 999X - 1 to 3 letters followed by 1 to 3 numbers followed by 1 letter 1983 - 2001 XXX999 XXX - 1 to 3 letters (excluding I, Q and Z) followed by 2 to 3 numbers followed by 3 letter 2001 to present XX99 XXX - 2 letters(excluding I, Q and Z) followed by 2 numbers (the first being 0, 5 or 6) followed by 3 letters Northern Ireland XXX 9999 - 2 or 3 letters followed by 1 to 4 numbers 9999 XXX - 1 to 4 numbers followed by 2 or 3 letters
Matches
GL55 ABB | A23 GMP | UFG 158
Non-Matches
GLB1 VVV | GL99 AAA | SSS 99999
Author Rating: Not yet rated. David Rose
Title Test Details IPv6 addresses (RFC 4291)
Expression
/^(((?=.*(::))(?!.*\3.+\3))\3?|([\dA-F]{1,4}(\3|:\b|$)|\2))(?4){5}((?4){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})\z/i
Description
This regex matches all (14.095.120.151.883.281.746.489.830.170.974.347.714.655.937) valid IPv6 address _representations_ as described by RFC 4291. Current regex is valid for PCRE only, for Perl/Java/Ruby/Phython/.NET/ECMA(JavaScript)/XML specific regex visit http://home.deds.nl/~aeron/regex/
Matches
1:2:3:4:5:6:7:8 | 1:2:3:4:5:6:1.2.3.4 | 1::8 | 1::1.2.3.4 | :: | ::1.2.3.4 | 0000:000:00:0::0.0.0.0
Non-Matches
::01.02.03.04 | ::001.002.003.004 | ::011.022.033.044
Author Rating: The rating for this expression. Aeron
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 Validating Currency or Floating Value
Expression
^(\d+\.\d+)$
Description
This will validate atleast minimum of one digit in either side of Decimal point
Matches
1.22 | 12.23 | 123.123
Non-Matches
1.. | . | 123. | .213
Author Rating: Not yet rated. Vishnuvardhan
Title Test Details Number
Expression
^\s*[+-]?\s*(?:\d{1,3}(?:(,?)\d{3})?(?:\1\d{3})*(\.\d*)?|\.\d+)\s*$
Description
Matches numbers. May include decimals, thousands separators, and sign.
Matches
5,000 | - 10 | .1
Non-Matches
7.000.000 | 5,0000 | 1.000,000
Author Rating: Not yet rated. mark
Title Test Details URL Pattern Match
Expression
^(http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?(?:[a-zA-Z0-9_])+\.(?:[a-zA-Z])+)$
Description
I was making a 301 redirect module and wanted to verify old and new urls
Matches
http://google.com/index.aspx, http://www.google.com/index.aspx
Non-Matches
http://google.com, http://www.google.com/index, http://www.google.com/index.aspx1234
Author Rating: Not yet rated. Yoginee Naik
Title Test Details Search sentences with words ending by -тся/-ться
Expression
([^\.]*?(\w+(???|????))[^\.]*?\.+)\s+
Description
Search sentences with words ending by -???/-????
Matches
Работа с регулярными выражениями является частью повседневной работы системного администратора. Смеркается. Кто-то едет в отпуск, кто-то выбирается на дачи за город. Эта машина мне нравиться.Эта машина мне нравится.
Non-Matches
Кандидат BSDA должен быть способен искать текстовые шаблоны при анализе вывода программ или поиске в файлах. Кандидат должен знать, где указывается диапазон символов в скобках [], определять литерал (?!), использовать квантификаторы, отличать метасимволы и создавать инвертированные фильтры.
Author Rating: Not yet rated. bask
Title Test Details French SS
Expression
([1,2].)(\d{2}.)(\d{2}.)(\d{2}.)(\d{3}.)(\d{3}.)(\d{2})
Description
Format od the French Socisl Security Number
Matches
1.54.03.65.116.157.99
Non-Matches
3.82.14.88.667.998.43
Author Rating: Not yet rated. fred denimal
Title Test Details E-mail validation
Expression
^(?:[^@<>;:,.()\s\[\]\\]+(?:\.(?!@))?)+@(?:[\w\-]+(?:\.(?!\.))?)+\.[A-Za-z]{2,6}$
Description
Email validation intended for javascript: use of lookahead ('.' not followed by '@') instead of lookbehind ('@' not preceded by '.'). It doesn't allow ip addresses.
Matches
aa.bb@cc.dd, ?_9+3=12!/-@pi.co.uk, çèré&pâtükõ@far-away.net
Non-Matches
aaa@127.0.0.1, (<aaa>)@bb.cc, .a..a@bb.cc, aaa.@bb.cc
Author Rating: Not yet rated. Christof Verhoeven
Title Test Details National Drug Code
Expression
\d{4}-\d{4}-\d{2}|\d{5}-\d{3}-\d{2}|\d{5}-\d{4}-\d{1}|\d{5}-\*\d{3}-\d{2}
Description
http://en.wikipedia.org/wiki/National_Drug_Code
Matches
1234-5678-90 | 12345-678-90 | 12345-6789-0 | 49981-*007-01
Non-Matches
1234-56-8-90 | 123-45678-90 | 1-345-6789-0
Author Rating: Not yet rated. Tom Struzik
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 Indian Mobile numbers
Expression
^([9]{1})([234789]{1})([0-9]{8})$
Description
Its 10 digits Indian Mobile Number validation.
Matches
9829373514
Non-Matches
919829373514, 09829373514
Author Rating: The rating for this expression. Gaurav Agrawal
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 Simple Malaysian New IC Number Validation (Ignore Gender)
Expression
([0-9][0-9])((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\-([0-9][0-9])\-([0-9][0-9][0-9][0-9])
Description
Simple Malaysian New IC Number Validation. Length: 8 characters. Format: YYMMDD-99-9999
Matches
900120-01-5567
Non-Matches
909020-01-5567;900120-0A-5567;900120-01-55
Author Rating: Not yet rated. Leos Toh
Title Test Details ICD9 code validation
Expression
^([EV])?\d{3,3}(\.\d{1,2})?$
Description
validates an ICD9 medical code which MAY start with an E or V, 3 digits, and MAY be followed by a period and a 1-2 digit sub-code
Matches
123.45 | E123.45 | V123.45 | 456.7 | E456.7 | V456.7 | 987 | E987 | V987
Non-Matches
e123 | X123 | e123.4 | e123.45 | E12345
Author Rating: Not yet rated. Ken Forslund
Title Test Details validation of comma delimited ICD9 codes
Expression
^([EV])?\d{3,3}(\.\d{1,2})?(, *([EV])?\d{3,3}(\.\d{1,2})?)*$
Description
See my sigle ICD9 validator for ICD9 rules. This does the same, and validates for comma delitter (with optiona space after comma)
Matches
E123 | E123.45, V456.6 | V456,E987.2, 123.45
Non-Matches
E123V456 | E123, x | 12;467.789
Author Rating: Not yet rated. Ken Forslund
Title Test Details CPT code
Expression
^\d{4,4}[A-Z0-9]$
Description
a CPT code is a 4 digits + a captial letter or number (forming 5 character code). The CPT code describes a medical procedure
Matches
0001F | 21082
Non-Matches
F0123 | 0001f | 100F
Author Rating: Not yet rated. Ken Forslund
Title Test Details comma delimited CPT code
Expression
^\d{4,4}[A-Z0-9](, *\d{4,4})[A-Z0-9]*$
Description
see my regex for explaining basic CPT. This validates a comma delimited (with possible spaces after comma) string of CPT codes
Matches
99396, 1234T | 12345 | 12345,98765, 99396
Non-Matches
1234T, x | 99396, 1234t
Author Rating: Not yet rated. Ken Forslund
Title Test Details IP Address
Expression
^\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}$
Description
Check for IP address
Matches
"192.1.3.25"; "255.255.255.255"; "100.30.27.54"
Non-Matches
"a.b.c.d"; "192.1683.3.25"; "192.168.2"
Author Rating: Not yet rated. Gustavo Salvador
Title Test Details Website URL
Expression
^((http:\/\/www\.)|(www\.)|(http:\/\/))[a-zA-Z0-9._-]+\.[a-zA-Z.]{2,5}$
Description
Focused on the website url validation
Matches
www.domain.com, http://www.domain.com,http://domain.com, www.domain.co.cc
Non-Matches
domain.com, domain
Author Rating: The rating for this expression. Ninu Ann Varghese
Title Test Details user name
Expression
^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,8}[a-zA-Z0-9]$
Description
This expression will validate user name with the following rules 1- It must start and end with a digit or character 2- It must be exactly 4 to 10 character long 3- Allowed Special Characters are _.-
Matches
1.ma | user | ma_mo-on.r
Non-Matches
_user | asfd@12 | user.
Author Rating: Not yet rated. Mamoon ur Rasheed
Title Test Details C++ Function Parser
Expression
(?<expo>public\:|protected\:|private\:) (?<ret>(const )*(void|int|unsigned int|long|unsigned long|float|double|(class .*)|(enum .*))) (?<decl>__thiscall|__cdecl|__stdcall|__fastcall|__clrcall) (?<ns>.*)\:\:(?<class>(.*)((<.*>)*))\:\:(?<method>(.*)((<.*>)*))\((?<params>((.*(<.*>)?)(,)?)*)\)
Description
Parses a C++ function, including return type, declaration type, namespace, class, method, exposure (public, private, protected) and params.
Matches
public: void __thiscall myClass::method(int, class myOtherClass * ) | public: void __thiscall myNamespace::myClass::method(void) | protected: class std::string __cdecl Library::Class::Method(class Param *, enum Type & const)
Non-Matches
myfunc(3) | object::myFunc(9, 4) | object->method(var)
Author Rating: Not yet rated. Sean Sube
Title Test Details Accepts everything except Zero and Double Zeros(0,00 are invalid Values)
Expression
[0][^0]|([^0]{1}(.){1})|[^0]*
Description
Accepts everything except Zero and Double Zeros(0,00 are invalid Values) for two Non Zero digits without using a RangeValidator
Matches
05,5,55,5A,50
Non-Matches
00,0
Author Rating: Not yet rated. Anand Khandelwal
Title Test Details Time
Expression
^([0-1]?[0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$
Description
match time for : H:nn:ss or HH:nn:ss
Matches
01:00:59 | 1:59:00 | 23:59:59
Non-Matches
24:00:00
Author Rating: Not yet rated. Wisanu Sanchan
Title Test Details DateTime Australia
Expression
^((((31\/(0?[13578]|1[02]))|((29|30)\/(0?[1,3-9]|1[0-2])))\/(1[6-9]|[2-9]\d)?\d{2})|(29\/0?2\/(((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])\/((0?[1-9])|(1[0-2]))\/((1[6-9]|[2-9]\d)?\d{2})) (20|21|22|23|[0-1]?\d):([0-5]?)\d$
Description
dd/mm/yyyy HH:MM
Matches
31/12/2010 14:00
Non-Matches
12/31/2010 14:61
Author Rating: Not yet rated. NoBug
Title Test Details Parttern Tittle
Expression
^\d(\.\d{1,2})?$
Description
this parttern only use for decimal number.
Matches
123 | 123.00 | 123.99
Non-Matches
123.999
Author Rating: Not yet rated. Hoang Bui Thanh
Title Test Details Date with Zero Time span
Expression
^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2})$|^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[2][0]\d{2}\s00\:00\:00)$
Description
This expression will parse the date with zero time span only (e.g. 26/07/2010 00:00:00)
Matches
26/07/2010 00:00:00
Non-Matches
26/07/2010 10:00:00 | 26/07/2010 10:34:14
Author Rating: Not yet rated. Anindya Chatterjee
Title Test Details Serial from BIND zone file's SOA
Expression
(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}\.?\t*\s*){2}\(\r*\n*([0-9]{1,})
Description
Gets serial from BIND zone file
Matches
dns1.server.com. dnsmaster.server.com. ( 2007102310 ; Serial 10800 ; Refresh 3600 ; Retry 604800 ; Expire 900 ) ; Minimum
Non-Matches
ädns1.server.com. dnsmaster.server.com. ( 2007102310 ; Serial 10800 ; Refresh 3600 ; Retry 604800 ; Expire 900 ) ; Minimum
Author Rating: Not yet rated. Jyri Turkia
Title Test Details IEEE float
Expression
[-+]?((\.[0-9]+|[0-9]+\.[0-9]+)([eE][-+][0-9]+)?|[0-9]+)
Description
Used in my SVG parser. Explanation: May start with + or -. This is followed by either an integer, or a float ("dot numbers", "numbers dot numbers" or "numbers dot" followed by an optional scientific postfix (+ or - followed by numbers) ) I'm using it to parse lists of floats, add ^$ boundaries if you want it to match whole lines.
Matches
10.2 | .0 | 3.9265e+2 | 5
Non-Matches
-one | . | whatever
Author Rating: The rating for this expression. Gaz Davidson
Title Test Details Alphanumeric
Expression
^([a-zA-Z][a-zA-Z0-9]{1,100})$
Description
This expression shows result for the alphanumeric value starts with only alpha bates.
Matches
shailesh123,shailesh,s123ailesh
Non-Matches
123shailesh,1Shailesh123
Author Rating: The rating for this expression. Shailesh Joge
Title Test Details State Abbreviations Upper or Lower Case
Expression
^([Aa][LKSZRAEPlkszraep]|[Cc][AOTaot]|[Dd][ECec]|[Ff][LMlm]|[Gg][AUau]|HI|hi|[Ii][ADLNadln]|[Kk][SYsy]|LA|la|[Mm][ADEHINOPSTadehinopst]|[Nn][CDEHJMVYcdehjmvy]|[Oo][HKRhkr]|[Pp][ARWarw]|RI|ri|[Ss][CDcd]|[Tt][NXnx]|UT|ut|[Vv][AITait]|[Ww][AIVYaivy])$
Description
This will take all state abbreviations used by the Post Office using either lower or upper case
Matches
CA, ca, Ca, cA
Non-Matches
XY, 2z, RB, CAx
Author Rating: Not yet rated. Jason Thornhill
Title Test Details Unnecessary Spaces in XHTML Attribute
Expression
(?<=(,|;|:))\s(?=((?:(?!<).)*>))
Description
Needing a way to shrink HTML based email to the smallest amount of characters, we wanted to remove any extra unnecessary white space characters in attributes such as style. This finds any space with a proceeding comma, semi-colon, or colon, and then checks with a lookahead for the closing > with a negative lookbehind to make sure that a < opening does not exist. The secondary trailing look behind is done to make sure that it does not change any content contained in the element.
Matches
<table width="750px" cellpadding="0" cellspacing="0" style="font-family: Arial , Helvetica , Sans-Serif ; font-size: 10pt;">
Non-Matches
<td>1, 2, 3</td>
Author Rating: The rating for this expression. Andrew Gruden
Title Test Details CNPJ / CPF do Brasil
Expression
(\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2})|(\d{3}\.\d{3}\.\d{3}\-\d{2})
Description
Valida e mascara CNPJ ou CPF dependendo do valor informado. Se informado dois digitos mais o ponto, será mascarado CNPJ se nao , CPF
Matches
12.123.123/1234-11 | 123.123.123-12
Non-Matches
qualquer letra
Author Rating: Not yet rated. Ricardo Oliveira
Title Test Details Currency Evaluator with commas and max 2 decimals
Expression
^([1-9]+\d{0,2},(\d{3},)*\d{3}(\.\d{1,2})?|[1-9]+\d*(\.\d{1,2})?)$
Description
Accepts non-negative numbers with max two decimals. Commas can be added after every thousand.
Matches
1200 | 1,200 | 1,200.0 | 12,324,532.23
Non-Matches
-43 | 0 | 01,423,534.23 | 24.4223 | 32,42,123
Author Rating: Not yet rated. Arvind
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 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 JQuery filename
Expression
jquery\-(\d|\.)*\.min\.js
Description
Checks for filename of any version of minified jquery in string.
Matches
jquery-1.4.2.min.js
Non-Matches
jquery.js, jquery-1.3.2.js
Author Rating: Not yet rated. Tomás Pica
Title Test Details DokuWiki Bold
Expression
(\*\*)(.+)(\*\*)
Description
Replacing match for bold formatting as DokuWiki writes it
Matches
** Hello World **
Non-Matches
*Hello* World
Author Rating: Not yet rated. Tomás Pica
Title Test Details DokuWiki Italic
Expression
(\/\/)(.+)(\/\/)
Description
Replacing match for italic formatting as DokuWiki writes it
Matches
// Hello World //
Non-Matches
/ Hello / World
Author Rating: Not yet rated. Tomás Pica
Title Test Details DokuWiki Underline
Expression
(\_\_)(.+)(\_\_)
Description
Replacing match for underline formatting as DokuWiki writes it
Matches
__ Hello World __
Non-Matches
_ Hello _ World
Author Rating: Not yet rated. Tomás Pica
Title Test Details Guid
Expression
^(?<BRACE>\{)?[a-fA-F\d]{8}-(?:[a-fA-F\d]{4}-){3}[a-fA-F\d]{12}(?<-BRACE>\})?(?(BRACE)^.)$
Description
Matches a string representation of a Guid, regardless of case, and does the correct brace matching
Matches
99283723-0938-0a9f-8b7c-029cba98d789 | {99283723-0938-0a9f-8b7c-029cba98d789} | {99283723-0938-0a9f-8b7c-029CBA98D789}
Non-Matches
{99283723-0938-0a9f-8b7c-029cba98d789 | 99283723-0938-0a9f-8b7c-029cba98d789} | 99283723-0938-0s9f-8b7c-029cba98d789
Author Rating: Not yet rated. Ryan Schreiber
Title Test Details Parse HTML images
Expression
"<[ \t]*[iI][mM][gG][ \t]*[sS][rR][cC][ \t]*=[ \t]*['\"]([^'\"]+)"
Description
Get all images in html string, ignore white space, tabs and is case insensitive. the result is iMG sRc ="ricardo.gif, after this just split the string and Enjoy it!
Matches
"<html><iMG sRc = \"ricardo.gif\" alt=\"1\"/><img src=\"whatever.gif\" /><img src =\"teste.gif\" alt=\"1\"/></html>"
Non-Matches
i don´t know
Author Rating: The rating for this expression. Ricardo Deus
Title Test Details Java Doc multiline
Expression
/\*.*(\R.+)+\*/ or /\*.*((\r\n).+)+\*/
Description
Matches java Documentation only with no code inside. Note : the first expression contains "\R" which is supported only in java engine, for any other engines you should use the second one but it will differs from a platform to another.
Matches
/** * * <!-- begin-xdoclet-definition --> * @ejb.interface-method view-type="remote" * <!-- end-xdoclet-definition --> * @generated * * //TODO: Must provide implementation for bean method stub */ |
Non-Matches
any java code will not match
Author Rating: Not yet rated. Ahmed Samir Srour
Title Test Details url chunks
Expression
(http|ftp|https):\/\/(\w[\w\-_\.]*\.)?([_\-\w]+)(:[0-9]+)?([\/[\w_\.-]+]*)\/(\.?\w[\w._-]*[\w_-])?(#\w+)?([\w\-\.,@?^=%&amp;:\~\+#]*[\w\-\@?^=%&amp;\/\~\+#])?
Description
divides an url into the different parts: protocol, subdomain, tld, port, folder, file, anchor, parameter
Matches
http://www.example.com/folder/file.php#anchor?parameter=value
Non-Matches
www.example.com
Author Rating: The rating for this expression. sir-saimn
Title Test Details Spanish cell phones
Expression
[+]346[0-9]{8}
Description
Validates spanish mobile phones, begining with +34 international code
Matches
+34687985249|+34625872485|+34689571437
Non-Matches
678547925|+34589785235|+3467988
Author Rating: Not yet rated. Jesús Bosch
Title Test Details Matches dates incl. February leap/common years
Expression
^\s*((31([-/ ])((0?[13578])|(1[02]))\3(\d\d)?\d\d)|((([012]?[1-9])|([123]0))([-/ ])((0?[13-9])|(1[0-2]))\12(\d\d)?\d\d)|(((2[0-8])|(1[0-9])|(0?[1-9]))([-/ ])0?2\22(\d\d)?\d\d)|(29([-/ ])0?2\25(((\d\d)?(([2468][048])|([13579][26])|(0[48])))|((([02468][048])|([13579][26]))00))))\s*$
Description
This .NET regular expression matches all valid dates in dd/MM/yyyy , dd-MM-yyyy or dd MM yyyy formats between 1/1/0000 and 31/12/9999 with the leading zero for the day and month portions being optional. The century for the year is optional for all dates except for the 29th of February of century years divisible by 400. This expression also validates the 29th of February for leap years, defined as (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0).
Matches
29-2-2000 | 31/12/9999 | 1 1 0000 | 29/02/0000 | 8/3/9841
Non-Matches
29/2/1900 | 29/02/2001 | 31/04/2000 | 28/02-1934 | 1/13/1978
Author Rating: The rating for this expression. Lewis TF Choo Man
Title Test Details Class ID (CLSID)
Expression
^\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}$
Description
Matches class ids (CLSID) including the pre & post curly brackets.
Matches
{4CC3A325-9885-48B4-B451-147C2D523646}, {4cc3a325-9885-48b4-b451-147c2d523646}
Non-Matches
{44CC3A325-9885-48B4-B451-147C2D523646}, {4CC3A3259885-48B4-B451-147C2D523646}, {4CC3A325-9885-48B4-B451-147C2D523646, {4CC3A325-9885-48B4-B451-147Z2D523646}
Author Rating: Not yet rated. Nathon Dalton
Title Test Details To Accept DECIMAL or FLOAT
Expression
^([0-9]*|\d*\.\d{1}?\d*)$
Description
This Expression will allow to accept the float or decimal values only. We always got stuck to allow only a decimal in the text area at any index along with numbers
Matches
.123, 123.1, 1.0
Non-Matches
1.1.1; 1.., 0.., .000.1
Author Rating: Not yet rated. Chandan Kumar
Title Test Details Pattern Title
Expression
^[0-9]*[1-9]+[0-9]*$
Description
Allows only positive integers that are greater than 0. Also allows for infinite zeros leading the integer Based on William Powell's Pattern Title, but modified to allow for leading zeros.
Matches
1 | 12 | 124 | 01 | 0012 | 000124
Non-Matches
-1 | a | 1.0 | 0000
Author Rating: The rating for this expression. John Megowan
Change page:   |    Displaying page 27 of 34 pages; Items 2601 to 2700

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