s2e-lab/RegexEval huggingface dataset:
Allows positive(non-negative) decimal values with 2 floating point values and less than or equal to 24.
Match examples:
- "23.50"
- "20.80"
- "23.99"
Non-match examples:
- "24.01"
- "25"
Regular expression: ^([0-2]{0,1})([0-3]{1})(\.[0-9]{1,2})?$|^([0-1]{0,1})([0-9]{1})(\.[0-9]{1,2})?$|^-?(24)(\.[0]{1,2})?$|^([0-9]{1})(\.[0-9]{1,2})?$
Match examples:
- "foo.Bar"
- "foo.bar.IFBar1"
- "wo.w_1.Ffo$o.Bar"
Non-match examples:
- "Bar"
- "Foo.Bar"
Regular expression: ^([a-z]{2,3}(\.[a-zA-Z][a-zA-Z_$0-9]*)*)\.([A-Z][a-zA-Z_$0-9]*)$
validates private ip addresses
Match examples:
- "10.10.10.10"
- "192.168.16.4"
- "172.016.22.55"
Non-match examples:
- "a.c.s.s"
- "100.10.10.10"
Regular expression: ^(1(0|7|9)2?)\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$
It just accepts negative and positive numeric entries. Dot (.) or comma (,) signs accepted only once.
Match examples:
- "43"
- "-43"
- "43.56"
Non-match examples:
- "ABC"
- "A43"
Regular expression: ^-?\d+([.,]?\d+)?$
It just accepts only positive numbers. Also accepts Dot (.) and comma (,) signs only once.
Match examples:
- "43"
- "43.56"
- "43,56"
Non-match examples:
- "ABC"
- "A43"
Regular expression: ^\d+([.,]?\d+)?$
Accepts positive and negative integers.
Match examples:
- "34"
- "-34"
- "1"
Non-match examples:
- "34.5"
- "-34.5"
Regular expression: ^-?\d+([^.,])?$
Accepts positive integers.
Match examples:
- "34"
- "1"
- "1000000000"
Non-match examples:
- "-34"
- "-1"
Regular expression: ^\d+([^.,])?$
Matches the words "Error" "Warning" "Exception"
Match examples:
- "Warning"
- "Exception"
- "Error"
Non-match examples:
- "Any log/text file that does not contain the words in the expression"
- "43de"
Regular expression: (?:Error|Warning|Exception)
689179398658361947162900315004214653913388899406447825346082368915517812766
Match examples:
- "kazoosoft"
- "tw33tfan"
- "MediaOwls"
Non-match examples:
- "@lpha"
- "bad\username"
Regular expression: ^([a-zA-Z0-9]{1,15})$
Percentage format for India and Germany. Maximum two digits before decimal and after decimal
Match examples:
- "89.56"
- "14.69"
- "56,23"
Non-match examples:
- "100.56"
- "25.365"
Regular expression: ^([1-9]{0,1})([0-9]{1})((\.[0-9]{0,1})([0-9]{1})|(\,[0-9]{0,1})([0-9]{1}))?$
Verifies a FORTRAN variable name to within 31 chars. Variable names in Fortran consist of 1-6 characters chosen from the letters a-z and the digits 0-9.
Match examples:
- "ABC1_1"
- "ABcdef"
- "abc_def_123"
Non-match examples:
- "1A"
- "_ABC"
Regular expression: ^[a-zA-Z]\w{0,30}$
Matches strings that contain lower or uppercase characters and numbers from zero to nine and an underscore
Match examples:
- "ab_12"
- "86WgUIAkoW6EeSyxCDr"
- "crV02leqeP4PxHkMOpuqDwgHa0BsYAcgl7vr5dqW0OXee_idkh_LML_S69fzYDsTCpLrtvs"
Non-match examples:
- "%$"
- "#3"
Regular expression: ^[A-Za-z0-9_]+$
Matches any 6-digit street address, with a minimum of two and up to four street names.
Match examples:
- "123456 My Street"
- "123 West Main St"
- "12345 Via De La Rosa"
Non-match examples:
- "123 Street"
- "1234 W Side Street"
Regular expression: ^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$|^\d{1,6}\040([A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,}\040[A-Z]{1}[a-z]{1,})$
Matches phone umbers in (###) ###-#### format
Match examples:
- "(717) 899-9998"
- "(947) 365-2800"
- "(634) 944-5341"
Non-match examples:
- "(717)999-9999"
- "999-999-9999"
Regular expression: \(\d{3}\)\040\d{3}-\d{4}
Matches hone numbers in format (###) ###-#### with only SoCal Area Codes.
Match examples:
- "(714) 123-4567"
- "(949) 555-5555"
- "(323) 467-1070"
Non-match examples:
- "(808) 666-6666"
- "(111)123-4567"
Regular expression: \(714|760|949|619|909|951|818|310|323|213|323|562|626\)\040\d{3}-\d{4}
Matches phone number in ###-###-#### format only with Southern California Area Codes
Match examples:
- "714-333-3333"
- "818-222-2222"
- "323-333-3333"
Non-match examples:
- "808-123-4567"
- "(808) 123-4567"
Regular expression: 714|760|949|619|909|951|818|310|323|213|323|562|626-\d{3}-\d{4}
Matches phone numbers with ANY-NON-DIGIT as delimiter and return proper US-Phone-Number. Use "($1) $2-$3$4" to get Number in form: "(234) 567-8901".
Will ignore starting 1, 01, 001, +1 etc.
Validates and also captures AreaCode, Prefix and Suffix for reformatting.
Match examples:
- "(234) 567-8901"
- "+1-234-567-890-1"
- "+001 2345678901"
Non-match examples:
- "12X345678901"
- "23456789X01"
Regular expression: ^\D{0,2}[0]{0,3}[1]{0,1}\D{0,2}([2-9])(\d{2})\D{0,2}(\d{3})\D{0,2}(\d{3})\D{0,2}(\d{1})\D{0,2}$
Matches HTML 'amp' codes
Match examples:
- "&reg;"
- "&nbsp;"
- "&#32;"
Non-match examples:
- "&32;"
- "8765455678"
Regular expression: ((&#[0-9]+|&[a-zA-Z]+[0-9]*?);)
matches strings that start with # + 3 hex numbers + optional 3 more hex numbers and 2 more hex numbers for alpha
Match examples:
- "#fff"
- "#123456"
- "#12345678"
Non-match examples:
- "#1234"
- "#0"
Regular expression: ^#[\dA-Fa-f]{3}(?:[\dA-Fa-f]{3}[\dA-Fa-f]{0,2})?$
Tests expression for Dual-tone multi-frequency (DTMF) combinations (numbers 0-9, asterisk, octothorpe and A,B,C,D or a,b,c,d). Does not limit number of occurrences or their order.
Match examples:
- "*AB132#"
- "12#AB*3"
- "*c3d42a##"
Non-match examples:
- "r13"
- "#bCz31*"
Regular expression: ^[0-9#\*abcdABCD]+$
Matches comma-separated numbers. Doesn't allow spaces in between numbers and/or between numbers and commas. Allows a single number to be added. Doesn't allow the sequence to end with a comma.
Match examples:
- "1321"
- "1321,0,42412"
- "0,1,2,3,4"
Non-match examples:
- "1321,,42412"
- "12c,13d,23"
Regular expression: ^[0-9]+(,[0-9]+)*$
Matches phone numbers with the prefix +91
Match examples:
- "+919123456789"
- "+918955336796"
- "+918689925852"
Non-match examples:
- "+91 9123456789"
- "+91-9123456789"
Regular expression: ^((\+){1}91){1}[1-9]{1}[0-9]{9}$
Matches against a valid UK Limited company numer, either Scotland, Wales England or Northern Ireland. Either 8 numerical digits or SC followed by 6 numerical digits are allowed
Match examples:
- "12345678"
- "SC123456"
- "81531165"
Non-match examples:
- "123456789"
- "AB123456"
Regular expression: ^\d{8,8}$|^[SC]{2,2}\d{6,6}$
This captures (for filters out non-digits) numbers with or without commas (eg currency) in the correct order. It doesn't check lengths or leading digits or number of digits between commas-
Match examples:
- "$1,234,567.89"
- "$1,234.80"
- "$34.45"
Non-match examples:
- "$1,234"
- "$123-45"
Regular expression: \$(\d*)??,??(\d*)??,??(\d*)\.(\d*)
Matches mobile numbers starting with 8 or 9 and having exactly 10 digits (total) or it must be blank
Match examples:
- "9323444432"
- "8022234456"
- "8812345678"
Non-match examples:
- "72"
- "54353454"
Regular expression: ^[89][0-9]{9}
Matches US phone pattern
Match examples:
- "222-222-2222"
- "333 333 3333"
- "444 444 4444"
Non-match examples:
- "3333333"
- "3333-333-33"
Regular expression: ^[\d]{3}[\s\-]*[\d]{3}[\s\-]*[\d]{4}\s*$
Matches ip4 address
Match examples:
- "192.168.0.1"
- "252.253.200.06"
- "216.252.21.91"
Non-match examples:
- "192.259.800.1"
- "."
Regular expression: ^(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])$
This will check to see if the string entered is all digits and is seven digits long. It will allow for leading zeros and also not allow for all zeros to be entered.
Match examples:
- "0000001"
- "1234567"
- "0003344"
Non-match examples:
- "000012"
- "12345678"
Regular expression: ^(000000[1-9])$|^(00000[1-9][0-9])$|^(0000[1-9][0-9][0-9])$|^(000[1-9][0-9][0-9][0-9])$|^(00[1-9][0-9][0-9][0-9][0-9])$|^(0[1-9][0-9][0-9][0-9][0-9][0-9])$|^([1-9][0-9][0-9][0-9][0-9][0-9][0-9])$
Matches date in  mm/dd/yyyy or m/d/yy format or various combinations. Checks for valid leap years.
Match examples:
- "2/28/1990"
- "2/29/1992"
- "03/1/10"
Non-match examples:
- "2/29/90"
- "11/31/2010"
Regular expression: ^((((0?[13578]|1[02])\/([0-2]?[1-9]|20|3[0-1]))|((0?[469]|11)\/([0-2]?[1-9]|20|30))|(0?2\/([0-1]?[1-9]|2[0-8])))\/((19|20)?\d{2}))|(0?2\/29\/((19|20)?(04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)|2000))$
Matches comma-separated integer values only. Does not allow commas before and end string.
Match examples:
- "123,345,4444444,56,6"
- "9885181,705,3488,9921"
- "3320068,393759853188395814,879,488101306523,343,55186434423393817249527865817284417"
Non-match examples:
- "12,@@34,fsff,333,"
- "$5"
Regular expression: ^[0-9][0-9,]*[0-9]$
Matches ip addresses. Takes into account trailing left zeros.
Match examples:
- "172.18.200.101"
- "00172.18.200.001"
- "172.255.255.255"
Non-match examples:
- "172.256.255.255"
- "1072.255.255.255"
Regular expression: ^((0*[0-1]?[0-9]{1,2}\.)|(0*((2[0-4][0-9])|(25[0-5]))\.)){3}((0*[0-1]?[0-9]{1,2})|(0*((2[0-4][0-9])|(25[0-5]))))$
Matches latitude and longitude coordinates are separated by a comma in the form:
N 0:59:59.99,E 0:59:59.99 No restriction on degrees. Use split on comma to separate Latitude and Longitude then on colon and space for parts to convert into a decimal value.
Match examples:
- "N 50:54:44.99,W 4:59:11.0"
- "N 38:55:02.90,W 76:59:31.19"
- "N 22:16:42,E 114:09:32"
Non-match examples:
- "N 22:66:61,E 85:00:33"
- "E 00:00:00.00,N 00:00:00.00"
Regular expression: [NS] \d{1,}(\:[0-5]\d){2}.{0,1}\d{0,},[EW] \d{1,}(\:[0-5]\d){2}.{0,1}\d{0,}
Matches the numbers 1-10
Match examples:
- "1"
- "2"
- "3"
Non-match examples:
- "0"
- "11"
Regular expression: (^[1-9]$)|(^10$)
Matches a string that contains exactly one letter in the range A-Z or a-z.
Match examples:
- "B"
- "L"
- "a"
Non-match examples:
- "BL"
- "akz"
Regular expression: ^[A-Za-z]$
Matches MySQL Query strings and comments. Lines that look like comments inside strings are not falsely recognised as comments.
Match examples:
- "-- insurance"
- "# renaming some primary keys"
- "/**/"
Non-match examples:
- "ALTER TABLE table_insurance_covered"
- "23"
Regular expression: ("(?:(?:(?:\\.)|[^"\\\r\n])*)"|'(?:(?:(?:\\.)|[^'\\\r\n])*)'|`(?:(?:(?:\\.)|[^`\\\r\n])*)`)|((?:-- .*)|(?:#.*)|(?:/\*(?:(?:[^*]|\*(?!/))*)\*/))
Matches hexadecimal values starting with #, and a combination of uppercase letters and numbers
Match examples:
- "#000000"
- "#FFFFFF"
- "#000FFF"
Non-match examples:
- "#ffffff"
- "#ABC"
Regular expression: ^#(\d{6})|^#([A-F]{6})|^#([A-F]|[0-9]){6}
This pattern matches italian mobile phone numbers:
- Tim (330, 331, 333, 334, 335, 336, 337, 338, 339, 360, 363, 366, 368)
- Vodafone Italia (340, 342, 345, 346, 347, 348, 349)
- Wind (320, 323, 327, 328, 329, 380, 383, 388, 389)
- 3 Italia (390, 391, 392, 393)
- RFI (313)
- virtual operators (370, 373, 377)
Match examples:
- "+393381234567"
- "+39 3381234567"
- "+39 338 1234567"
Non-match examples:
- "0039 338 1234567"
- "(338)1234567"
Regular expression: ^([+]39)?\s?((313)|(32[03789])|(33[013456789])|(34[0256789])|(36[0368])|(37[037])|(38[0389])|(39[0123]))[\s-]?([\d]{7})$
Matches Indian Postal with six digits and does not start with zero
Match examples:
- "362265"
- "1254215"
- "256201"
Non-match examples:
- "021545"
- "00"
Regular expression: ^(?!0{1})\d{6}
Matches the Dutch postal code official format of "9999 AA". Allows 0 or 1 space.
Match examples:
- "9999 AA"
- "9999AA"
- "0280 HX"
Non-match examples:
- "9999 aa"
- "9999?AA"
Regular expression: ^[0-9]{4} {0,1}[A-Z]{2}$
Matches valid Medicare HIC number according to CMS specifications
Match examples:
- "H123456"
- "XYZ123456789"
- "123456789B"
Non-match examples:
- "H123"
- "H999999"
Regular expression: (?![A-Z](\d)\1{5,})(^[A-Z]{1,3}(\d{6}|\d{9})$)|(^\d{9}[A-Z][0-9|A-Z]?$)
Validates US vehicle identification number (VIN). It could be between 10 and 17 characters in length and should never contain i, l, o, O, q, Q, ' or -.
Match examples:
- "12345awertasfggr"
- ">kdYNa1c}K;k~"
- "JXf|!@vnE^<|~0"
Non-match examples:
- "12345qwertasfggr"
- "3efw"
Regular expression: ^[^iIoOqQ'-]{10,17}$
Matches Danish street addresses.
It ensures that the format "Address No" is honored, but also allows any char to be put after the address.
Match examples:
- "Teststreet 32"
- "Tørststræde 4"
- "Tørststræde 24 1. tv"
Non-match examples:
- "Tørststræde"
- "2 Tørststræde"
Regular expression: ^((.){1,}(\d){1,}(.){0,})$
Matches open or closed times
Match examples:
- "0700-1530"
- "1130-2310"
- "Closed"
Non-match examples:
- "0700"
- "Not open"
Regular 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)$
Matches dates in formats
02/06/2010
2/6/10
02-06-2010
2-6-10
Match examples:
- "02/06/2010"
- "66-6/32"
- "74-7-88"
Non-match examples:
- "02 June 2010"
- "January 26th"
Regular expression: \d{1,2}(/|-)\d{1,2}(/|-)\d{2,4}
Will match any web path that's supposed to start in the root (e.g. with "/" in front of it.)
Match examples:
- "./some/file.html \this\is\a.file ../blah/blah"
- "./"
- "/"
Non-match examples:
- "path\in\current.folder"
- "root"
Regular expression: ^\.{0,2}[\/\\]
Matches 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.
Match examples:
- "312359 UTC Jun 99"
- "070518 UTC Feb99"
- "151647 UTC Sep 44"
Non-match examples:
- "322567 UTC June 1999"
- "UTC"
Regular 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}$
Matches email addresses with no special characters
Match examples:
- "abc@cde.com"
- "abd@def.com.cn"
- "a2b_cd3-2fg.ss@a2bd5_sd-mbv.com.cn"
Non-match examples:
- "abc@ccddme.my.com.cn"
- "e123421@dwe@c.cd"
Regular expression: ^[\w]+[-\.\w]*@[-\w]+\.[a-z]{2,6}(\.[a-z]{2,6})?$
This will match numbers with at least one digit on either side of the decimal point
Match examples:
- "1.22"
- "12.23"
- "123.123"
Non-match examples:
- "1.."
- "."
Regular expression: ^(\d+\.\d+)$
Matches numbers. May include decimals, thousands separators, and sign.
Match examples:
- "5,000"
- "- 10"
- ".1"
Non-match examples:
- "7.000.000"
- "5,0000"
Regular expression: ^\s*[+-]?\s*(?:\d{1,3}(?:(,?)\d{3})?(?:\1\d{3})*(\.\d*)?|\.\d+)\s*$
Matches 10-digit Indian Mobile Numbers that need to start with 9
Match examples:
- "9829373514"
- "9226491171"
- "9289014901"
Non-match examples:
- "919829373514"
- "09829373514"
Regular expression: ^([9]{1})([234789]{1})([0-9]{8})$
Matches US states and territories in 2 letter abbreviations. It accepts the Lower and Upper Case Entries.
Match examples:
- "MN"
- "tx"
- "Tx"
Non-match examples:
- "M"
- "23"
Regular 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])$
Matches Malaysian New IC Number Validation.
Length: 8 characters.
Format: YYMMDD-99-9999
Match examples:
- "900120-01-5567"
- "461131-51-1689"
- "850315-65-0584"
Non-match examples:
- "909020-01-5567"
- "900120-0A-5567"
Regular 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])
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
Match examples:
- "123.45"
- "E123.45"
- "V123.45"
Non-match examples:
- "e123"
- "X123"
Regular expression: ^([EV])?\d{3,3}(\.\d{1,2})?$
Matches a CPT code with 4 digits + a capital letter or number (forming 5 character code). The CPT code describes a medical procedure
Match examples:
- "0001F"
- "21082"
- "1332U"
Non-match examples:
- "F0123"
- "0001f"
Regular expression: ^\d{4,4}[A-Z0-9]$
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 _.-
Match examples:
- "1.ma"
- "user"
- "ma_mo-on.r"
Non-match examples:
- "_user"
- "asfd@12"
Regular expression: ^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,8}[a-zA-Z0-9]$
match time with formats H:nn:ss or HH:nn:ss
Match examples:
- "01:00:59"
- "1:59:00"
- "23:59:59"
Non-match examples:
- "24:00:00"
- "noon"
Regular expression: ^([0-1]?[0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$
Accepts non-negative numbers with max two decimals. Commas can be added after every thousand.
Match examples:
- "1200"
- "1,200"
- "1,200.0"
Non-match examples:
- "-43"
- "0"
Regular expression: ^([1-9]+\d{0,2},(\d{3},)*\d{3}(\.\d{1,2})?|[1-9]+\d*(\.\d{1,2})?)$
Allows only positive integers that are greater than 0. Also allows for infinite zeros leading to the integer
Match examples:
- "1"
- "12"
- "124"
Non-match examples:
- "-1"
- "a"
Regular expression: ^[0-9]*[1-9]+[0-9]*$
allows validation of phone numbers in different formats, including local dialing code (eg 033 or 076) or international dialing code in the formats +12 or 0012 or 0912.
Match examples:
- "073-386-2612"
- "0443862612"
- "076 858 7777"
Non-match examples:
- "qdsq11123"
- "sdfgty654"
Regular expression: [0](\d{9})|([0](\d{2})( |-|)((\d{3}))( |-|)(\d{4}))|[0](\d{2})( |-|)(\d{7})|(\+|00|09)(\d{2}|\d{3})( |-|)(\d{2})( |-|)((\d{3}))( |-|)(\d{4})
Matches a percentage between 1 and 100. Accepts up to 2 decimal places. No decimal places are accepted.
Match examples:
- "1%"
- "52%"
- "100%"
Non-match examples:
- "0%"
- "100"
Regular expression: ^([1-9][0-9]?|100)%$
Matching dates in XX.YY.ZZ format
Match examples:
- "01.02.23"
- "11.89.46"
- "92.52.78"
Non-match examples:
- "1.2.3"
- "23456.2345.2345"
Regular expression: ^([0-9][0-9])[.]([0-9][0-9])[.]([0-9][0-9])$
Matches plain application configuration files that contain any form of ip addresses, with or without port number followed and with protocol at the beginning". It also does not match IPs that have one digit at the first number.
Match examples:
- "/172.21.134.89: /127.0.0.1: "14.14.14.14""
- "=148.48.233.103;"
- ">145.101.251.196;"
Non-match examples:
- ""255.255.255.255" "243.243.2.0" "2.222.222.222" /2224.2224.2224.2224:"
- "34567ui"
Regular expression: [\\""=/>](25[0-4]|2[0-4][0-9]|1\d{2}|\d{2})\.((25[0-4]|2[0-4][0-9]|1\d{2}|\d{1,2})\.){2}(25[0-4]|2[0-4][0-9]|1\d{2}|\d{2}|[1-9])\b[\\""=:;,/<]
Match all IP addresses other than 127.0.0.1. It dose not match an IP has 0 at the last number
Match examples:
- "172.21.134.89 127.1.1.1 7.0.0.1 214.214.214.214"
- "213.728.138.115"
- "252.783.463.44"
Non-match examples:
- "127.0.0.1 192.168.1.0 255.255.255.255"
- "2345"
Regular expression: \b(1(?!27\.0\.0\.1)\d{1,2}|2[0-4][0-9]|25[0-4]|\d{1,2})\.(?:\d{1,3}\.){2}(25[0-5]|2[0-4][0-9]|1\d{2}|\d{2}|[1-9])\b
validates a date-time field in yyyy/m/d format. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1900-2999, and all 2 digits years except 00
Match examples:
- "2008/2/29"
- "2010/12/31"
- "2400/02/29"
Non-match examples:
- "2009/2/29"
- "2010/11/31"
Regular expression: ^(((19|2\d)\d{2}\/(((0?[13578]|1[02])\/31)|((0?[1,3-9]|1[0-2])\/(29|30))))|((((19|2\d)(0[48]|[2468][048]|[13579][26])|(2[048]00)))\/0?2\/29)|((19|2\d)\d{2})\/((0?[1-9])|(1[0-2]))\/(0?[1-9]|1\d|2[0-8]))$
validates a date-time field in yyyy/m/d format. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999, and all 2 digits years except 00
Match examples:
- "2008/2/29"
- "2010/12/31"
- "2400/02/29"
Non-match examples:
- "2009/2/29"
- "2010/11/31"
Regular expression: ^(((1[6-9]|[2-9]\d)\d{2}\/(((0?[13578]|1[02])\/31)|((0?[1,3-9]|1[0-2])\/(29|30))))|((((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))\/0?2\/29)|((1[6-9]|[2-9]\d)\d{2})\/((0?[1-9])|(1[0-2]))\/(0?[1-9]|1\d|2[0-8]))$
this expression validates a date-time field in yyyy/m/d or yyyy-m-d format. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999, and all 2 digits years except 00
Match examples:
- "2008/2/29"
- "2010/12/31"
- "2400-02-29"
Non-match examples:
- "2009/2/29"
- "2010/11/31"
Regular expression: ^(((1[6-9]|[2-9]\d)\d{2}([-|\/])(((0?[13578]|1[02])([-|\/])31)|((0?[1,3-9]|1[0-2])([-|\/])(29|30))))|((((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))([-|\/])0?2([-|\/])29)|((1[6-9]|[2-9]\d)\d{2})([-|\/])((0?[1-9])|(1[0-2]))([-|\/])(0?[1-9]|1\d|2[0-8]))$
Matches positive real multi-digit number: don't allow preceding zero, last decimal digit zero not allowed.
Match examples:
- "1500"
- "0,331"
- "12.005"
Non-match examples:
- "01500"
- "0,330"
Regular expression: ^([1-9]\d*|0)(([.,]\d*[1-9])?)$
Matches any strings without special characters, but can have - [ or ]
Match examples:
- "AdnanSattar"
- "4567jki"
- "evbtyui"
Non-match examples:
- "Adnan=Sattar"
- "(*&^%$"
Regular expression: ^[^<>`~!/@\#},.?"-$%:;)(_ ^{&*=|'+]+$
Matches polish tax identification number (NIP). Mask accepted:
XXX-XX-XX-XXX ; XXX-XXX-XX-XX ; XXX XX XX XXX ; XXX XXX XX XX
Match examples:
- "222-22-22-222"
- "222-222-22-22"
- "222 22 22 222"
Non-match examples:
- "2222222222"
- "XXXXXXXXXX"
Regular expression: ^((\d{3}[- ]\d{3}[- ]\d{2}[- ]\d{2})|(\d{3}[- ]\d{2}[- ]\d{2}[- ]\d{3}))$
This regular expression will validate against a valid MAC address. The 6 bytes are hexadecimal and separated by semi colon or dash caracters.
Match examples:
- "01:23:45:67:89:AB"
- "BA-57:B3-B9:C2-A8"
- "D4-AC:94-1C-4E-90"
Non-match examples:
- "01:23:45:67:89:X9"
- "12345678"
Regular expression: ^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$
Matches any positive decimal number > 0 with optional leading '+' symbol and optional leading or trailing zeros on both sides of the decimal point. Decimal point is also optional and either side of the decimal is optional.
Match examples:
- "010"
- "010."
- ".010"
Non-match examples:
- "."
- "0"
Regular expression: ^[+]?((\d*[1-9]+\d*\.?\d*)|(\d*\.\d*[1-9]+\d*))$
Matches the UK Drivers License format:
i. Must be 16 characters
ii. First 5 characters are alphanumeric.
iii. Next 6 characters must be numeric
iv. Next 3 characters are alphanumeric
v. Last 2 characters are alpha
vi. Second character of numeric section can only be 0, 1, 5 or 6. 7.
Fourth and fifth characters of numeric section must be in the range 01 to 31.
Match examples:
- "SASAS701062AB8DD"
- "OOVJW664033DAGCW"
- "ASD12405315AA4AA"
Non-match examples:
- "SASAS701062AB8D"
- "ASD12405315AA4A"
Regular expression: \b[A-Z0-9]{5}\d{1}[01567]\d{1}([0][1-9]|[12][0-9]|[3][0-1])\d{1}[A-Z0-9]{3}[A-Z]{2}\b
Matches a name that is s string compound of letters in upper or lower case and three more typographical characters, the hyphen (-), the simple quote or apostrophe ('), and the space. For these three characters, not at the beginning or the end of the string.
Match examples:
- "Pierre-Francis d'Astier de Weyergans-Migery"
- "Jeanne d'Arc"
- "Nicolas Sarkozy"
Non-match examples:
- "-tutu"
- "tutu-"
Regular expression: ^[a-zA-Z][a-zA-Z\-' ]*[a-zA-Z ]$
This will validate 12 hours time format with AM/am PM/pm
Match examples:
- "11:11 AM"
- "01:11 PM"
- "12:59 AM"
Non-match examples:
- "21:11 AM"
- "00:00 PM"
Regular expression: ^([1-9]|1[0-2]|0[1-9]){1}(:[0-5][0-9][ ][aApP][mM]){1}$
Range validator for urine lab panel specific gravity. The valid range is 1.000 to 1.400 inclusive. Sometimes < and > are used but not in the context of <1.000 nor >1.400. To 1, 2 or 3 decimals. Normal range is 1.003 to 1.03 but is left to the viewer.
Match examples:
- ">1.0"
- "<1.001"
- ">1.399"
Non-match examples:
- ">1.400"
- "1."
Regular expression: (((^[>]?1.0)(\d)?(\d)?)|(^[<]?1.0(([1-9])|(\d[1-9])|([1-9]\d)))|(^[<]?1.4(0)?(0)?)|(^[<>]?1.(([123])(\d)?(\d)?)))$
DD/MM/YYYY with leap year detection as most of the date regex are in MM/DD/YYYY format. Allows MM and DD to be 1 or 2 digits, eg. D/M/YYYY, D/MM/YYYY or DD/M/YYYY
Match examples:
- "21/01/1972"
- "21/1/1972"
- "1/1/1972"
Non-match examples:
- "21-01-1972"
- "21-01-1972"
Regular expression: ^(((0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(29|30)|(0?[13578]|1[02])/31)/(0?[1-9]|1[012])/(19|[2-9]\d)\d{2}|0?29/0?2/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$