s2e-lab/RegexEval huggingface dataset:
It accepts the most common United States phone number formats that normal people use. The number 1 at the beginning is optional and so is the separators. The separators can be a dash (-), a period (.), or a space. Putting the area code in parenthesis is also an option.
Match examples:
- "1-234-567-8910"
- "(123) 456-7891"
- "123.456.7891"
Non-match examples:
- "12-345-678-9101"
- "123-45678"
Regular expression: ^(1?(?: |\-|\.)?(?:\(\d{3}\)|\d{3})(?: |\-|\.)?\d{3}(?: |\-|\.)?\d{4})$
Matches US zip codes. The post office number is optional.
Match examples:
- "12345"
- "12345-6789"
- "05434-0199"
Non-match examples:
- "1234"
- "123456"
Regular expression: ^(\d{5}(?:\-\d{4})?)$
Matches a properly formatted time according to the international date and time notation ISO 8601. ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds.
Match examples:
- "24"
- "24:00"
- "23:59:59"
Non-match examples:
- "25"
- "24:60"
Regular expression: ^([0-2][0-4](?:(?:(?::)?[0-5][0-9])?|(?:(?::)?[0-5][0-9](?::)?[0-5][0-9](?:\.[0-9]+)?)?)?)$
Accepts all integers between 0-100
Match examples:
- "0"
- "00"
- "01"
Non-match examples:
- "-1"
- ".23"
Regular expression: ^0?[0-9]?[0-9]$|^(100)$
This regular expression will match on a real/decimal/floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas.
Match examples:
- "123"
- "123.54"
- "-.54"
Non-match examples:
- "123.543"
- "0012"
Regular expression: ^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
Matches telephone numbers in any form or length. Can have parentheses, periods, dashes, +/-, or spaces.
Match examples:
- "(604) 789-0136"
- "+123-45678-908"
- "_535503003)(84326870 1803293_"
Non-match examples:
- "01.12.23"
- "phone number"
Regular expression: (\+)?([-\._\(\) ]?[\d]{3,20}[-\._\(\) ]?){2,10}
Captures strings that can have spaces and punctuation.
Match examples:
- ""hello!""
- ""hello again"!"
- "I'm back"
Non-match examples:
- "hello""
- ""hello again!"!"
Regular expression: ^((\'|\")?[a-zA-Z]+(?:\-[a-zA-Z]+)?(?:s\'|\'[a-zA-Z]{1,2})?(?:(?:(?:\,|\.|\!|\?)?(?:\2)?)|(?:(?:\2)?(?:\,|\.|\!|\?)?))(?: (\'|\")?[a-zA-Z]+(?:\-[a-zA-Z]+)?(?:s\'|\'[a-zA-Z]{1,2})?(?:(?:(?:\,|\.|\!|\?)?(?:\2|\3)?)|(?:(?:\2|\3)?(?:\,|\.|\!|\?)?)))*)$
Accepts a list of 4 digits separated by commas. Used to validate a list of years.
Match examples:
- "2001,2002,2003"
- "1999"
- "1999,2000,"
Non-match examples:
- "123"
- "1234,e,1234"
Regular expression: ^(\d{4},?)+$
Matches the valid date format MM/DD/CCYY
Year from 2000 to 2008 and the month will accept till 12 and the day will accept till 31
Match examples:
- "01/02/2006"
- "12/31/2007"
- "1/1/2008"
Non-match examples:
- "01/02/1999"
- "13/32/2008"
Regular expression: \b(0?[1-9]|1[0-2])(\/)(0?[1-9]|1[0-9]|2[0-9]|3[0-1])(\/)(200[0-8])\b
Matches the valid date format MM-DD-CCYY
Year from 2000 to 2008 and the month will accept till 12 and the day will accept till 31
Match examples:
- "01-02-2006"
- "12-31-2007"
- "1-1-2008"
Non-match examples:
- "01-02-1999"
- "13-32-2008"
Regular expression: \b(0?[1-9]|1[0-2])(\-)(0?[1-9]|1[0-9]|2[0-9]|3[0-1])(\-)(200[0-8])\b
Matches URL to a domain name. Only for HTTP but that can be easily changed to accept more. The dashes and underscores can only be used between text and/or digits, and it does not allow query strings.
Match examples:
- "http://www.website.com/"
- "http://my-website.net"
- "http://another_site.org"
Non-match examples:
- "www.website.com"
- "http://_website.com"
Regular expression: ^(http\:\/\/(?:www\.)?[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*(?:\.[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*)*\.[a-zA-Z]{2,7}(?:\/)?)$
Check whether the entered string looks like a URI, with a specified protocol.
Match examples:
- "this://is.accepted.com/?and=it&sO=K"
- "this://is.accept.ed?too="
- "and://also.this.one:12/?is=right"
Non-match examples:
- "this.is.NOT.accepted"
- "neither://this.is&one"
Regular expression: ^([a-zA-Z]+)://([a-zA-Z0-9_\-]+)((\.[a-zA-Z0-9_\-]+|[0-9]{1,3})+)\.([a-zA-Z]{2,6}|[0-9]{1,3})((:[0-9]+)?)((/[a-zA-Z0-9_\-,.;=%]*)*)((\?[a-zA-Z0-9_\-,.;=&%]*)?)$
Matches the numbers 40-49
Match examples:
- "40"
- "41"
- "42"
Non-match examples:
- "4"
- "50"
Regular expression: \b4[0-9]\b
This expression stops the characters <>/?&{};# from a string of any length. Meaning, strings without those characters.
Match examples:
- "any word"
- "a"
- "a number 4382"
Non-match examples:
- "<"
- ">"
Regular expression: [^<>/?&{};#]+
Matches percentages with 2 values after decimal point
Match examples:
- "3.00"
- "100.00"
- "45"
Non-match examples:
- "101"
- "4.678"
Regular expression: ^(100(?:\.0{1,2})?|0*?\.\d{1,2}|\d{1,2}(?:\.\d{1,2})?)$
This pattern can be used to validate URLs starting with ftp, http or https
Match examples:
- "https://user:password@subdomain.domain.tld:80/~user/a_1/b.2//c%203/file.extension?query=string&with=various&param_eters&and=param,eters&with[]=brackets&and:colons&uniqid={21EC2020-3AEA-1069-A2DD-08002B30309D}"
- "https://user"
- "https://user:wecec@cere"
Non-match examples:
- "http://domain.....tld"
- "https://"
Regular expression: ^(ftp|https?):\/\/([^:]+:[^@]*@)?([a-zA-Z0-9][-_a-zA-Z0-9]*\.)*([a-zA-Z0-9][-_a-zA-Z0-9]*){1}(:[0-9]+)?\/?(((\/|\[|\]|-|~|_|\.|:|[a-zA-Z0-9]|%[0-9a-fA-F]{2})*)\?((\/|\[|\]|-|~|_|\.|,|:|=||\{|\}|[a-zA-Z0-9]|%[0-9a-fA-F]{2})*\&?)*)?(#([-_.a-zA-Z0-9]|%[a-fA-F0-9]{2})*)?$
Match numbers for Austria Tax IDS. Format is ATU12345678
Match examples:
- "ATU12345678"
- "ATU98752658"
- "ATU98765432"
Non-match examples:
- "ATb12345678"
- "ATu12345678"
Regular expression: ^(AT){0,1}[U]{0,1}[0-9]{8}$
Match Tax ID number for Bulgaria. Formats are
BG123456789
BG1234567890
Match examples:
- "BG123456789"
- "BG1234567890"
- "BG1587963587"
Non-match examples:
- "BG12349"
- "Bg1234567890"
Regular expression: ^(BG){0,1}([0-9]{9}|[0-9]{10})$
Expression to validate a date with or without time in standard or 24 hour format with optional milliseconds (01/12/08 23:31:05 or 5/12/1974 11:59 PM).
Match examples:
- "01/28/08 22:34:12"
- "10/23/1952 5:23:01 PM"
- "6/2/02 22:59"
Non-match examples:
- "1/32/08"
- "12/29/005"
Regular expression: (^0?[1-9]|^1[0-2])\/(0?[1-9]|[1-2][0-9]|3[0-1])\/(19|20)?[0-9][0-9](\s(((0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?)|((0?[0-9]|1[0-2]):[0-5][0-9](:[0-5][0-9])?\s(AM|PM))))?$
Checks for the format alphanumeric\alphanumeric (alphanumeric meaning letter or number).
Match examples:
- "Admin\user1"
- "ajit\123"
- "123\Ajit1"
Non-match examples:
- "\domain\user"
- "domain\\\user"
Regular expression: ^([a-zA-Z0-9])+\\{1}([a-zA-Z0-9])+$
Valid XML Node or Attribute Names start with a letter <document>, an underscore <_record> or a colon (generally avoid using a colon)
The next characters may be letters, digits, underscore, hyphens, periods and colons (but no whitespaces)
Match examples:
- "_1record"
- "MyXMLTag"
- ":ThisIsGr8"
Non-match examples:
- "1record"
- "My XMLTag"
Regular expression: ^[a-zA-Z_:]+[a-zA-Z_:\-\.\d]*$
Zip code validation for Switzerland.
Forces 4-digits only zipcode starting at 1000
Match examples:
- "1000"
- "1200"
- "8200"
Non-match examples:
- "a-z"
- "aaaa"
Regular expression: ^[1-9][0-9][0-9][0-9]$
Match the style attribute inner text contained inside " or ' caracters with the "style=" prefix.
Match examples:
- "style="width: 10px;border:0" , style='width: 10px;border:0'"
- "'gRH"#'"
- "'y#5GiMSY].1y$nDz.nr,0vsla2WcTN0#b2Xj_`5z<a~e3}6.?M)L:q.r)bb-kq'"
Non-match examples:
- "style = "width:10px""
- "ddcs"
Regular expression: style="[^"]*"|'[^']*'
Validates dates in the following format: MM/DD/YY
Match examples:
- "01/30/08"
- "12/04/99"
- "01/05/10"
Non-match examples:
- "13/30/05"
- "9/33/99"
Regular expression: ((0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))/\d{2}
Used for matching a URL and can be used for extracting the domain name from a given URL ending with '/'.
Match examples:
- "http://www.google.com/"
- "http://google.com/"
- "http://code.google.com/"
Non-match examples:
- "http://www.google.com;"
- "website"
Regular expression: ^http[s]?://([a-zA-Z0-9\-]+\.)*([a-zA-Z]{3,61}|[a-zA-Z]{1,}\.[a-zA-Z]{2})/.*$
Matches the TLD of a given domain (replace yourdomain.com with whatever domain you're trying to enforce).
Match examples:
- "yourdomain.com"
- "http://www.yourdomain.com"
- "http://subdomain.yourdomain.com/pages/manage/?act=4015876&ag=709254588456a"
Non-match examples:
- "your-domain.com"
- "ourdomain.com"
Regular expression: ^.*(yourdomain.com).*$
Validates a decimal with up to 8 whole places and up to two decimal places
Match examples:
- "1"
- "1.22"
- "12345678.11"
Non-match examples:
- "123456789"
- "1.223234"
Regular expression: ^(\d{1,8}|(\d{0,8}\.{1}\d{1,2}){1})$
Matches the valid date format MM/DD/YY Year from 2000 (00) to 2008 (08) and the month will accept till 12 and the day will accept till 31
Match examples:
- "01/02/06"
- "12/31/07"
- "1/1/08"
Non-match examples:
- "01/02/1999"
- "13/32/08"
Regular expression: \b(0?[1-9]|1[0-2])(\/)(0?[1-9]|1[0-9]|2[0-9]|3[0-1])(\/)(0[0-8])\b
Matches the railway time format that 00:00:00 to 23:59:59
Match examples:
- "00:00:00"
- "23:59:59"
- "10:00:00"
Non-match examples:
- "24:0:00"
- "20:60:60"
Regular expression: \b(0[0-9]|1[0-9]|2[0-3])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\b
It will matches the Standard time format that 00:00:00 to 11:59:59
Match examples:
- "00:00:00"
- "11:59:59"
- "10:00:00"
Non-match examples:
- "20:00:00"
- "10:60:60"
Regular expression: \b(0[0-9]|1[0-1])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\b
It will matches the Standard time format that 00:00:00 AM to 11:59:59 PM
Match examples:
- "00:00:00 AM"
- "11:59:59 PM"
- "10:00:00 AM"
Non-match examples:
- "00:00:00"
- "11:59:59"
Regular expression: \b(0[0-9]|1[0-1])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])(\:)(0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\s*(AM|PM|A|P)\b
VALIDATE THE DATE FORMAT FULL MONTH DAY, CCYY i.e August 30, 2006. Accepts years 2000-2009
Match examples:
- "JANUARY 26, 2007"
- "MARCH 1, 2001"
- "DECEMBER 31, 2005"
Non-match examples:
- "JAN 26, 2001"
- "JULY 31 2005"
Regular expression: \b(((J(ANUARY|UNE|ULY))|FEBRUARY|MARCH|(A(PRIL|UGUST))|MAY|(SEPT|NOV|DEC)EMBER|OCTOBER))\s*(0?[1-9]|1[0-9]|2[0-9]|3[0-1])\s*(\,)\s*(200[0-9])\b
VALIDATE THE DATE FORMAT FULL MONTH DAY, YY i.e August 30, 06 (2006)
Accepts years 2000-2009
Match examples:
- "JANUARY 26, 07"
- "MARCH 1, 01"
- "DECEMBER 31, 05"
Non-match examples:
- "JAN 26, 01"
- "JULY 31 05"
Regular expression: \b(((J(ANUARY|UNE|ULY))|FEBRUARY|MARCH|(A(PRIL|UGUST))|MAY|(SEPT|NOV|DEC)EMBER|OCTOBER))\s*(0?[1-9]|1[0-9]|2[0-9]|3[0-1])\s*(\,)\s*(0[0-9])\b
VALIDATE THE DATE FORMAT SHORT MONTH DAY, CCYY i.e Aug 30, 2006. Accepts years 2000-2009
Match examples:
- "JAN 26, 2007"
- "MAR 1, 2001"
- "DEC 31, 2005"
Non-match examples:
- "JANUARY 26, 2001"
- "JUL 31 2005"
Regular expression: \b((J(AN|UN|UL))|FEB|MAR|(A(PR|UG))|MAY|SEP|NOV|DEC|OCT)\s*(0?[1-9]|1[0-9]|2[0-9]|3[0-1])\s*(\,)\s*(200[0-9])\b
VALIDATE THE DATE FORMAT SHORT MONTH DAY, YY i.e AUG 30, 06 (2006). Accepts years 2000-2009
Match examples:
- "JAN 26, 07"
- "MAR 1, 01"
- "DEC 31, 05"
Non-match examples:
- "JANUARY 26, 01"
- "JUL 31 05"
Regular expression: \b((J(AN|UN|UL))|FEB|MAR|(A(PR|UG))|MAY|SEP|NOV|DEC|OCT)\s*(0?[1-9]|1[0-9]|2[0-9]|3[0-1])\s*(\,)\s*(0[0-9])\b
Detects spaces. Splits a string by spaces, except when the space is within a quote-delimited set of characters.
Match examples:
- "(some number of spaces)"
- "(one space)"
- "(two spaces)"
Non-match examples:
- ""no matches""
- ""noMatches""
Regular expression: \s(?=([^"]*"[^"]*"[^"]*)*$|[^"]*$)
Detect favicon base64 data from Firefox bookmark HTML files, thereby reducing file size (useful for HTML bookmark backup and transfer).
Match examples:
- "<DT><A HREF="http://www.gmail.com/" ADD_DATE="1147950005" LAST_MODIFIED="1147950022" ICON_URI="https://mail.google.com/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiElEQVQ4jdWPsQ3AIAwEGYtZ2IZpvIGHoaRLm47q0wCyiY2SKspL3/mOJ4T/p8SI0TNnNKJtz5whGSUoMQLMcMOM9T7I14+UfEmHj5TUiikA4EsWGIAtMCUGvBWAWUkULFbZglrRiJREwo0IqNURDLgfjO/I2fLmJlhhN11iLngcb8GbTsHnuQAHliL7fehqZAAAAABJRU5ErkJggg==" LAST_CHARSET="UTF-8">Google Mail</A>"
- "ICON="~8G$""
- "ICON="d-9ME6lcr[[:)qQ]'~WAZ~5yGH)w.jZwmIe396Ya[)+GuQr/t{S]]-[n}?NqB.E}NL.(mt=8W>*+""
Non-match examples:
- "<DT><A HREF="http://flickr.com/" ADD_DATE="1107635483" LAST_VISIT="1189245562" LAST_MODIFIED="1114539579" LAST_CHARSET="UTF-8" ID="rdf:#$Ppq5x3">Flickr</A>"
- "///"
Regular expression: ICON="[^"]+"
Matches numerics between -91and 90 (exclusive).
Match examples:
- "5.4"
- "-0.58"
- "-90"
Non-match examples:
- "-120"
- "+1.4F"
Regular expression: (^\+?([1-8])?\d(\.\d+)?$)|(^-90$)|(^-(([1-8])?\d(\.\d+)?$))
Matches time in formats
 hh:mm:ss
hh:mm
hh:mm:ss pm (am,PM,AM)
<12h
Match examples:
- "11:23:43PM"
- "3:25:35"
- "1:23 am"
Non-match examples:
- "12:01:01"
- "3.14pm"
Regular expression: ^((1[01])|(\d)):[0-5]\d(:[0-5]\d)?\s?([apAP][Mm])?$
Match <td ***>***</td> in html
Match examples:
- "<td>hello kitty</td>"
- "<TD WIDTH='20></TD>"
- "<TD >&NBSP;</td>"
Non-match examples:
- "<td>< /td>"
- "<TD HELLO</td>"
Regular expression: ^<\s*(td|TD)\s*(\w|\W)*\s*>(\w|\W)*</(td|TD)>$
Match ip addresses from 1.0.0.0 to 223.255.255.255
Match examples:
- "192.168.0.1"
- "223.255.255.255"
- "9.0.0.0"
Non-match examples:
- "0.10.2.52"
- "255.255.255.255"
Regular expression: ^((([1]\d{2})|(22[0-3])|([1-9]\d)|(2[01]\d)|[1-9]).(([1]\d{2})|(2[0-4]\d)|(25[0-5])|([1-9]\d)|\d).(([1]\d{2})|(2[0-4]\d)|(25[0-5])|([1-9]\d)|\d).(([1]\d{2})|(2[0-4]\d)|(25[0-5])|([1-9]\d)|\d))$
This is the USA Date Format. MM/DD/YYYY with checking leap year
Match examples:
- "05/15/2008"
- "02/29/2008"
- "02/29/3200"
Non-match examples:
- "05-12-2008"
- "02/29/2007"
Regular expression: (((0[13578]|10|12)([/])(0[1-9]|[12][0-9]|3[01])([/])([1-2][0,9][0-9][0-9]))|((0[469]|11)([/])([0][1-9]|[12][0-9]|30)([/])([1-2][0,9][0-9][0-9]))|((02)([/])(0[1-9]|1[0-9]|2[0-8])([/])([1-2][0,9][0-9][0-9]))|((02)([/])(29)(\.|-|\/)([02468][048]00))|((02)([/])(29)([/])([13579][26]00))|((02)([/])(29)([/])([0-9][0-9][0][48]))|((02)([/])(29)([/])([0-9][0-9][2468][048]))|((02)([/])(29)([/])([0-9][0-9][13579][26])))
Matches a person's name with at least 2 parts (first and last). Allows optional extra names. It allows plenty of initials as well as symbols in names. Restricts symbol usage quite a bit, but allows even names with 2 symbols. Requires last name to have at least 2 characters and cannot be an initial.
Match examples:
- "E.J. O'Malley"
- "Jack O'Neil"
- "Mary-Lou Elizabeth Jones"
Non-match examples:
- "Johnathan Michael S."
- "Prince"
Regular expression: ^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$
Matches the year month and day in format (YYYY-MM-DD).
Match examples:
- "2008-12-15"
- "1960-05-16"
- "2091-1-7"
Non-match examples:
- "1556/9/8"
- "year"
Regular expression: ((19|20)[0-9]{2})-(([1-9])|(0[1-9])|(1[0-2]))-((3[0-1])|([0-2][0-9])|([0-9]))
This checks whether the string is equals to "*" i.e., contains only "*(Asterisk)" or begins with Asterisk.
Match examples:
- "*"
Non-match examples:
- "a*"
- "asdf"
Regular expression: ^[:*:]
Number divisible by 0.005
Match examples:
- "1.005"
- "60"
- "0.08"
Non-match examples:
- "1.009"
- "-8"
Regular expression: ^[0-9]+\.?[0-9]?[0-9]?[0,5]?$
Used to validate fractions or UK odds.
It will match integers, allowing 10/1 to be entered as 10, and fractions.
It will not match negative numbers or fractions, spaces or any alphabetical characters.
Match examples:
- "10"
- "2/3"
- "100/30"
Non-match examples:
- "-10"
- "-2/3"
Regular expression: ^\d+\/?\d*$
Matches numbers with or without decimal
Match examples:
- "123"
- "123.1"
- "100."
Non-match examples:
- "12345.1234"
- ".012"
Regular expression: ^(\d{1,4}?[.]{0,1}?\d{0,3}?)$
Matches amounts of money with an optional decimal point. If the decimal comma is in string, then 2 trailing digits are required. Also, checks for the optional euro sign.
Match examples:
- "1"
- "1,00"
- "1.000,00"
Non-match examples:
- "1a"
- ".00,00"
Regular expression: ^([\u20AC]?[1-9]\d*\.\d{3}(?:,\d{2})?|[\u20AC]?[1-9]\d*(?:,\d{2})?|[\u20AC]?[1-9]\d*)$
Matches po boxes. This one won't match the word "box" in the address. Only matches if there is a number following the po box. Also accepts a # in front of the number and other spelling variations.
Match examples:
- "po box 123"
- "p.o.b. #123"
- "box 123"
Non-match examples:
- "123 box canyon rd"
- "po box *"
Regular expression: \b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b
Matches entries that start with http:// or https:// and the contents are limited to alphas
Match examples:
- "http://www.google.com"
- "https://www.google.com"
- "http://localhost/"
Non-match examples:
- "www.google.com"
- "website"
Regular expression: http[s]?://[a-zA-Z0-9.-/]+
Integer with or without commas. Signed or unsigned.
Match examples:
- "1,234"
- "1234"
- "-1,234"
Non-match examples:
- "12,34"
- "1.234"
Regular expression: ^[-|\+]?[0-9]{1,3}(\,[0-9]{3})*$|^[-|\+]?[0-9]+$
Match any number, no characters, no empty sets, and accept zero.
Match examples:
- "0001"
- "12345"
- "40788018763604681545698910422212,34"
Non-match examples:
- "abcd"
- "012a"
Regular expression: ^([0-9]{1}[\d]{0,2}(\,[\d]{3})*(\,[\d]{0,2})?|[0-9]{1}[\d]{0,}(\,[\d]{0,2})?|0(\,[\d]{0,2})?|(\,[\d]{1,2})?)$
A simple regex to check a version information string of the style 1.0.0.0
Match examples:
- "1.2.3.4"
- "0.0.2.48504995526161112907723074823733001360950519953024188524490023263126367337734975355"
- "7.0.0.0"
Non-match examples:
- "1.2.3"
- "01.02.03.04"
Regular expression: ^(0\.|([1-9]([0-9]+)?)\.){3}(0|([1-9]([0-9]+)?)){1}$
Matches any number that includes the US currency symbol ($), a negative sign (-), comma separators, and a decimal. It matches an unlimited number of decimal places. It does NOT reject an empty string passed to it.
Match examples:
- "$.01"
- "1,234.003"
- "834223.1"
Non-match examples:
- ".0,001"
- "1,1.01"
Regular expression: ^((\$?\-?)|(\-?\$?))([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)?(\.[0-9]*)?$
Matches International Classification of Diseases (ICD-10) codes
Match examples:
- "Z99.9"
- "Z99"
- "G82"
Non-match examples:
- "Z999"
- "Z99."
Regular expression: ^[A-Z]\d{2}(\.\d){0,1}$
Date in DD/MM/YYYY or D/M/YYYY format.
Match examples:
- "01/06/2008"
- "1/1/2008"
- "29.2/9200"
Non-match examples:
- "32/13/2008"
- "00/00/2005"
Regular expression: (((0*[1-9]|[12][0-9]|3[01])([-./])(0*[13578]|10|12)([-./])(\d{4}))|((0*[1-9]|[12][0-9]|30)([-./])(0*[469]|11)([-./])(\d{4}))|((0*[1-9]|1[0-9]|2[0-8])([-./])(02|2)([-./])(\d{4}))|((29)(\.|-|\/)(02|2)([-./])([02468][048]00))|((29)([-./])(02|2)([-./])([13579][26]00))|((29)([-./])(02|2)([-./])([0-9][0-9][0][48]))|((29)([-./])(02|2)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02|2)([-./])([0-9][0-9][13579][26])))
Matches any word except with xx and yy
Match examples:
- "x"
- "xxx"
- "xxyy"
Non-match examples:
- "xx"
- "yy"
Regular expression: (?!\b(xx|yy)\b)\b[\w]+\b
Allows percent values from 0 to 100 without the % sign. Can be used with up to 2 decimal places or without any.
Match examples:
- "0"
- "0.00"
- "50.25"
Non-match examples:
- "100.01"
- "-1"
Regular expression: ^100$|^100.00$|^\d{0,2}(\.\d{1,2})? *%?$
This expression allows you to select 1-365 as a numeric value for the days of the year. Must be between 1 and 365 and must be numeric
Match examples:
- "25"
- "363"
- "110"
Non-match examples:
- "2.5"
- "0"
Regular expression: ^[1-9]{1}$|^[1-9]{1}[0-9]{1}$|^[1-3]{1}[0-6]{1}[0-5]{1}$|^365$
This will accept SSN in the form of 123-45-6789 OR 123456789.
Match examples:
- "123-45-6789"
- "123456789"
- "456-63-6666"
Non-match examples:
- "123-45-459a"
- "222-2-2222"
Regular expression: ^(\d{3}-\d{2}-\d{4})|(\d{3}\d{2}\d{4})$
Expression to validate currency formatted numbers without the currency symbol
Match examples:
- "153"
- "33.48"
- "786.1"
Non-match examples:
- "-123"
- "8524.258"
Regular expression: ^(\d?)*(\.\d{1}|\.\d{2})?$
pattern match for U.S. social security number
Match examples:
- "111-22-3333"
- "667-98-7198"
- "331-67-7759"
Non-match examples:
- "11-222-3333"
- "1111-22-333"
Regular expression: (\d{3}\-\d{2}\-\d{4})
Validate: First five characters are letters; characters six-17 are letters, numbers, or hyphens; string length is eight characters minimum, 17 characters maximum
Match examples:
- "ABCDE123abc-123AB"
- "pFNulUVyRFPTu"
- "MuRqTOCiErV9"
Non-match examples:
- "1BCDE123abc-123AB -BCDE123abc-123AB ABCDE6789012345678"
- "3434rfes"
Regular expression: ^([a-zA-Z]{5})([a-zA-Z0-9-]{3,12})
Matches everything except lines that begin with SEP.
Match examples:
- "SEk001"
- "TAK002"
- "SE7ge+f9FQ7x ]]9ZEl]Pg"@}j DTw%oyyAz"
Non-match examples:
- "SEP001"
- "SEP002"
Regular expression: ^([^S]|S[^E]|SE[^P]).*
This expression will validate if a string represents a time in 24 hour format.
The expression will evaluate the string from start to finish. It will not accept 24:00, use 00:00 instead.
Match examples:
- "1:59"
- "01:59"
- "23:59"
Non-match examples:
- "24:00"
- "01:60"
Regular expression: ^([0-1]?[0-9]{1}|2[0-3]{1}):([0-5]{1}[0-9]{1})$
Returns the Top-level domain from a URL.
Match examples:
- ".com/"
- ".net/"
- ".biz/"
Non-match examples:
- ".co.uk/"
- ".org.uk/"
Regular expression: ([.])([a-z,1-9]{3,4})(\/)
Verifies a currency amount entered has commas and two decimal spaces to the right. This has a range between 1.99 to the tens of millions.
Match examples:
- "1.99"
- "111,111.99"
- "11,111,111.99"
Non-match examples:
- "1.999"
- "1111"
Regular expression: ^\$?\d{1,2}\,\d{3}?\,\d{3}?(\.(\d{2}))$|^\$?\d{1,3}?\,\d{3}?(\.(\d{2}))$|^\$?\d{1,3}?(\.(\d{2}))$
Captures the leading 1 in $1, the area code in $2, the 3-digit prefix in $3, and the four-digit postfix in $4.
This expression DOES allow for reserved area codes (001,etc) which are not typically in use.
Match examples:
- "(123)456-7890"
- "1234567890"
- "123 456 7890"
Non-match examples:
- "123456789"
- "(1234)567890"
Regular expression: (1)?-?\(?\s*([0-9]{3})\s*\)?\s*-?([0-9]{3})\s*-?\s*([0-9]{4})\s*
Matches elements separated with hyphen or spaces
Match examples:
- "+48 500-080-100"
- "500080100"
- "500 080 100"
Non-match examples:
- "+47 100-100-100"
- "1000-100-100"
Regular expression: ^(\+48\s+)?\d{3}(\s*|\-)\d{3}(\s*|\-)\d{3}$
Matches dutch postal codes are ranged from "1000 AA" to "9999 ZZ".
Match examples:
- ""1484 EE""
- "4996                                                      ZT"
- "3617                                                   JP"
Non-match examples:
- ""1484EE""
- ""0111 AB""
Regular expression: \b[1-9]\d{3}\ +[A-Z]{2}\b
Captures html tags (< >)
Match examples:
- "<p> Hello Ali Delshad </p>"
- "<^*Copm9W4.08uAL6f{mmVLpyk&^~_SCFpg-\V#myG\4Bj77>"
- "<QX`3>"
Non-match examples:
- "Hello Ali Delshad"
- "<"
Regular expression: <[^>]*>
checks strings for Persian Unicode character
Match examples:
- "سلام"
- "hello علی"
- "Hi 2 سلام"
Non-match examples:
- "Hello"
- "Ali"
Regular expression: [\u0600-\u06FF]
Password matching expression. Password must be at least 8 characters,no more then 25 characters, must include at least 1 lower case letter and 1 numeric digit. Upper case, space and punctuation marks are not allowed.
Match examples:
- "aaaaaaa1"
- "abcdefghijklmnoprqstu1234"
- "1234567a"
Non-match examples:
- "aaaaaaA1"
- "0123456789kB"
Regular expression: ^(?=.*\d)(?=.*[a-z])([a-z0-9]{8,25})$
Match examples:
- "SH"
- "OF1234567890"
- "NP1234"
Non-match examples:
- "SH123"
- "SH12D"
Regular expression: ^((([sS]|[nN])[a-hA-Hj-zJ-Z])|(([tT]|[oO])[abfglmqrvwABFGLMQRVW])|([hH][l-zL-Z])|([jJ][lmqrvwLMQRVW]))([0-9]{2})?([0-9]{2})?([0-9]{2})?([0-9]{2})?([0-9]{2})?$
Validate dates that are in month/year (MMYYYY) format without slashes, periods, dashes, or spaces. No special characters or letters are allowed. MM values allowed are 01 through 12. YYYY values allowed are 1900 - 2999.
Match examples:
- "052000"
- "122008"
- "101972"
Non-match examples:
- "12/2003"
- "131997"
Regular expression: (((0[123456789]|10|11|12)(([1][9][0-9][0-9])|([2][0-9][0-9][0-9]))))