s2e-lab/RegexEval huggingface dataset:
The expression matches any weekday name (english) in short (2 or 3 characters) or full style. Use it with case insensitive mode in your date matching expressions.
Match examples:
- "Mo"
- "Sun"
- "Monday"
Non-match examples:
- "Any"
- "day"
Regular expression: (Mo(n(day)?)?|Tu(e(sday)?)?|We(d(nesday)?)?|Th(u(rsday)?)?|Fr(i(day)?)?|Sa(t(urday)?)?|Su(n(day)?)?)
Matches mobile numbers that stars with 7,8,9 and have a total 10 digits
Match examples:
- "9848457682"
- "8748070871"
- "9140445480"
Non-match examples:
- "123456789"
- "234"
Regular expression: ^([7-9]{1})([0-9]{9})$
Matches international phone number with 6 capturing groups:
international prefix (00 xor '+');
1 to 3 international code number, no zero allowed;
optional space or hyphen;
0 to 3 local prefix number;
optional space or hyphen;
5 to 11 local number without spaces or hyphens;
Match examples:
- "0034 91 12345678"
- "+39-2-1234567"
- "9112345678"
Non-match examples:
- "0034 91 123-456-789"
- "(91)12345678"
Regular expression: ^((\+|00)[1-9]{1,3})?(\-| {0,1})?(([\d]{0,3})(\-| {0,1})?([\d]{5,11})){1}$
Matches DD/MM/YYYY for Arabic Hijri Dates. It starts range from 1434 ( current year ) to 1499
Match examples:
- "29/12/1434"
- "01/02/1435"
- "30/11/1434"
Non-match examples:
- "31/12/144"
- "01/2/1435"
Regular expression: ((0[1-9])|(1[0-9])|(2[0-9])|(3[0]))/((0[1-9])|(1[0-2]))/14[3-9]{2}
Match french phone number with or without french international dialling code
Match examples:
- "+33622313131"
- "02 02 02 02 02"
- "0303030303"
Non-match examples:
- "+34622313131"
- "1702020202"
Regular expression: ^(0|\+33)[1-9]([-. ]?[0-9]{2}){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})?$
accepts date and optinal time with format
(dd)[.-/](MM)[.-/](yyyy)[ ]
(hh)[:](mm)[:](ss)
Match examples:
- "01-01-2014 10:50"
- "01/01/2014 10:50:59"
- "11-10-2012"
Non-match examples:
- "01-01-2014 10:60"
- "32-01-2014 10:50"
Regular expression: ^(([0][1-9]|[1|2][0-9]|[3][0|1])[./-]([0][1-9]|[1][0-2])[./-]([0-9]{4})|(([0][1-9]|[1|2][0-9]|[3][0|1])[./-]([0][1-9]|[1][0-2])[./-]([0-9]{4}))[ ]([0|1][0-2])[:](([0-5][0-9]))([:](([0-5][0-9])))?)$
Matches INN code is formed by:
the code of the tax department where INN was given (4 numbers), the record number of a registered company in the territorial section of the Unified State Register of Legal Entities in the tax department where INN was given (5 numbers), check digit (1 numbers)
Match examples:
- "1234567891"
- "6121546557"
- "2996330885"
Non-match examples:
- "-"
- "23"
Regular expression: ^([0-9]{4})([0-9]{5})([0-9]{1})$
Matches OGRN code is formed by: the state registration number has the status of the main one (1 number), two last numbers of the year when the record was made (2 numbers), the sequence number of a constituent entity of Russia according to the list of constituent entities of Russia (2 numbers), record number entered in the state register within a year (7 numbers), check digit (1 number)
Match examples:
- "1234567891234"
- "0175106545632"
- "5969169407468"
Non-match examples:
- "-"
- "23"
Regular expression: ^([0-9]{1})([0-9]{2})([0-9]{2})([0-9]{7})([0-9]{1})$
This pattern validates dates with slash (/) separator and with years between 1900 and 2099.
Match examples:
- "01/01/1900"
- "05/12/2014"
- "31/12/2099"
Non-match examples:
- "41/01/1900"
- "21/31/2014"
Regular expression: ^((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|[1][02])([/])(19[0-9][0-9]|20[0-9][0-9]))|((0[1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(19[0-9][0-9]|20[0-9][0-9]))|((0[1-9]|[1][0-9]|[2][0-8])([/])(02)([/])(19[0-9][0-9]|20[0-9][0-9]))|((29)([/])(02)([/])(190[48]|19[13579][26]|19[2468][048]|20[02468][048]|20[13579][26]))$
Matches 6 digit pin codes
Match examples:
- "221001"
- "929803"
- "304135"
Non-match examples:
- "abcdd"
- "ewrtyu"
Regular expression: ^[1-9][0-9][0-9][0-9][0-9][0-9]$
Matches year, month and day with dashes.Year starts from 1900 to 2015 and must be 4 digits.
Match examples:
- "2012-05-21"
- "1960-12-14"
- "1910-5-3"
Non-match examples:
- "2011/5/21"
- "60-12-14"
Regular expression: ^((19[0-9][0-9])|(20[0-1][0-5]))\-((0?[1-9])|(1[0-2]))\-((0?[1-9])|([1-2][0-9])|(3[0-1]))$
Matches UK postcode.
Examples of valid:
AA9A 9AA
A9A 9AA
A9 9AA
A99 9AA
AA9 9AA
AA99 9AA
Match examples:
- "EC1A 2BB"
- "WyMM 8YE"
- "IwSy 1KR"
Non-match examples:
- "111A 1BB"
- "234567"
Regular expression: ^([A-Z]{1}\w{1,3}) (\d{1}[A-Z]{2})$
Matches dutch moped license plate number validity
Match examples:
- "D-123-AS"
- "D123AS"
- "F-123-SA"
Non-match examples:
- "Others"
- "moped"
Regular expression: [0-9]{2}-?[DF][A-Z]{2}-?[0-9]{1}|[DF][A-Z]{1}-?[0-9]{3}-?[A-Z]{1}|[DF]-?[0-9]{3}-?[A-Z]{2}|[DF][A-Z]{2}-?[0-9]{2}-?[A-Z]{1}$
Matches IPs addresses. This uses the UNIX Bash 'traceroute' command's IP format
Match examples:
- "(8.8.8.8)"
- "(127.0.0.1)"
- "(58.5.15.18)"
Non-match examples:
- "(a.sg.af.)"
- "8.8.8.8"
Regular expression: \(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\)
Matches UK Parcelforce delivery tracking code for internal UK posts. Comes in two formats 2 letters and 7 numbers (e.g. AA1234567) and 4 letters and 10 numbers (e.g. AAAA1234567890). Case insensitive.
Match examples:
- "AA1234567"
- "AAAA1234567890"
- "JY7712375"
Non-match examples:
- "non"
- "matching"
Regular expression: ^([A-z]{2}\d{7})|([A-z]{4}\d{10})$
Matches UK Parcelforce delivery tracking code for international tracking of exports. Comes in two formats: 2 letters and 9 numbers and GB (e.g. AA123456789GB) and 12 numbers (e.g. 123456789012). Case insensitive.
Match examples:
- "AA123456789GB"
- "123456789012"
- "JW114554115GB"
Non-match examples:
- "non"
- "matching"
Regular expression: ^([A-z]{2}\d{9}[Gg][Bb])|(\d{12})$
Matches UK Parcel force delivery tracking code for international tracking of imports. Uses a negative look ahead to prevent it from ending in GB which would be an international export code.
Match examples:
- "AA123456789AA"
- "`s222501350jn"
- "YK497549717Tf"
Non-match examples:
- "AA123456789GB"
- "AA123456789gb"
Regular expression: ^[A-z]{2}\d{9}(?![Gg][Bb])[A-z]{2}$
Matches TNT UK delivery company consignment number tracking code for TNT Track and Trace service. The system will use the 9 digit code (e.g. 123456789) or you can use the letters as shown on your consignment note (e.g. GE123456781WW). Case insensitive.
Match examples:
- "123456789"
- "GE123456781WW"
- "729600602Ey"
Non-match examples:
- "non"
- "matching"
Regular expression: ^(?:[A-z]{2})?\d{9}(?:[A-z]{2})?$
This regular expressions matches jalali dates of the form YYYY/XX/XX where XX can be 1 or 2 digits long and YYYY is always 4 digits long.
Match examples:
- "1394/01/3"
- "1365/12/31"
- "1397/02/01"
Non-match examples:
- "1394/1/555"
- "139/1/4"
Regular expression: ^\d{4}\/\d{1,2}\/\d{1,2}$
Matches date in form Year-Month-Day
Match examples:
- "2015-08-31"
- "0132/10/12"
- "9345.12.31"
Non-match examples:
- "31/08/2015"
- "date"
Regular expression: [0-9]{4}[/.-](?:1[0-2]|0?[1-9])[/.-](?:3[01]|[12][0-9]|0?[1-9])
Matches facebook, twitter, or youtube
Match examples:
- "facebook"
- "twitter"
- "youtube"
Non-match examples:
- "imgur"
- "3e456yhtbgf"
Regular expression: (facebook|twitter|youtube)
Match IP address IPv4 (127.0.0.1)
Match examples:
- "127.0.0.1"
- "250.136.255.92"
- "253.5.255.111"
Non-match examples:
- "127-0-0-1"
- "IP"
Regular expression: ((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])
Matches time in format HH:MM (23:30)
Match examples:
- "23:30"
- "23.30"
- "20.7"
Non-match examples:
- "23-30"
- "time"
Regular expression: (?:2[0-3]|[01]?[0-9])[:.][0-5]?[0-9]
Matches basic UTR and CRT formats, 10 digits however are often written with an optional space after 1st 5
Match examples:
- "1234567890"
- "12345 67890"
- "14980 16473"
Non-match examples:
- "123 4567890"
- "A123456789"
Regular expression: [0-9]{5}\s?[0-9]{5}
Simple check for a value between 1 and 12
Match examples:
- "1"
- "2"
- "12"
Non-match examples:
- "-1"
- "13"
Regular expression: ^([1-9]|1[0-2])$
Matches 3 digit number representing an HMRC Tax Office. Office 000 is not valid
Match examples:
- "001"
- "123"
- "940"
Non-match examples:
- "-01"
- "000"
Regular expression: ^(?=.*[1-9].*)[0-9]{3}$
Matches UK Numbers, with optional GB at the start.
Match examples:
- "GB123456789"
- "123456789"
- "GB604774876"
Non-match examples:
- "GB12345678"
- "AA123456789"
Regular expression: ^(GB)?([0-9]{9})$
Matches Pension Schemes with 8 digits followed by R and then another letter.
Match examples:
- "12345678RA"
- "43213245RT"
- "83536006RP"
Non-match examples:
- "1234567RA"
- "432132456RR"
Regular expression: ^[0-9]{8}R[A-HJ-NP-TV-Z]$
Matches standard UK Registration plates running from Sept 2001 to Feb 2051, basic form AA99AAA but contains prefix combinations, the only number not used is 01
Match examples:
- "NE02ABC"
- "AA58DEF"
- "CH08NDO"
Non-match examples:
- "NF02ABC"
- "AA01WUX"
Regular expression: ^(A[A-HJ-M]|[BR][A-Y]|C[A-HJ-PR-V]|[EMOV][A-Y]|G[A-HJ-O]|[DFHKLPSWY][A-HJ-PR-Y]|MAN|N[A-EGHJ-PR-Y]|X[A-F]|)(0[02-9]|[1-9][0-9])[A-HJ-P-R-Z]{3}$
Matches sizes of paper from A0-A10
Match examples:
- "A0"
- "A6"
- "A10"
Non-match examples:
- "A-1"
- "B1"
Regular expression: ^A([0-9]|10)$
Matches any number possible as long as its even.
Match examples:
- "2"
- "64"
- "4343253298"
Non-match examples:
- "3"
- "65"
Regular expression: ^([1-9]+)?[02468]$
Matches negative and positive numbers with or without commas and with or without decimals
Match examples:
- "-9.999"
- "99,999,999.99"
- "9999.99"
Non-match examples:
- "-.9"
- ".9"
Regular expression: ^(-?)((\d{1,3})(,\d{3})*|\d+)((\.\d+)?)$
Matches password with lower, and upper case letters, digits, and special characters in any order
Match examples:
- "#3aZ"
- "3#aZ"
- "3a#Z"
Non-match examples:
- "#$@!"
- "aB3a"
Regular expression: ^([\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+[a-z]+[A-Z]+|[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+[A-Z]+|[0-9]+[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+|[0-9]+[a-z]+[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+|[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+[A-Z]+[a-z]+|[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+[a-z]+|[0-9]+[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+|[0-9]+[A-Z]+[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+|[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+[0-9]+[A-Z]+|[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+[A-Z]+|[a-z]+[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+|[a-z]+[0-9]+[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+|[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+[A-Z]+[0-9]+|[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+[0-9]+|[a-z]+[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+|[a-z]+[A-Z]+[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+|[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+[0-9]+[a-z]+|[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+[a-z]+|[A-Z]+[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+|[A-Z]+[0-9]+[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+|[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[A-Z]+[a-z]+[0-9]+|[A-Z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[a-z]+[0-9]+|[A-Z]+[a-z]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+[0-9]+|[A-Z]+[a-z]+[0-9]+[\$@!%\*\?&`~\^\\(\)\[\]\{\}<>,\._#-]+)+$
Matches html comments but excludes comments that contain if statements
Match examples:
- "<!-- this is a comment -->"
- "<!--;^RN|Ma){QQuC?"z|RVWY_@i]%3>2=d,z-->"
- "<!--Kb;-S2tff.DGG\WZ!hF(]/`0-].z$\* t*/Ir39:8^B+s&@{tX$;?-->"
Non-match examples:
- "<!-- [if lt IE 9]>blah<![endif]-->"
- "<ref>"
Regular expression: <!--(?!\s*\[if[^]]+]>[^<]*<!\[endif\]).*?-->
This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long and YYYY is always 4 digits long
Match examples:
- "4/1/2001"
- "12/12/2001"
- "55/5/3434"
Non-match examples:
- "1/1/01"
- "12 Jan 01"
Regular expression: ^\d{1,2}\/\d{1,2}\/\d{4}$
Matches all types of time declaration with ':' separator.
Match examples:
- "0:26:12 aM"
- "00:26:12 Pm"
- "0:26:12aM"
Non-match examples:
- "eferfqe"
- "ergqfr"
Regular expression: ((a|p|A|P)(m|M)\s{0,1}(0[0-9]|1[0-2]|[0-9]):[0-5][0-9]:[0-5][0-9])|((a|p|A|P)(m|M)\s{0,1}(0[0-9]|1[0-2]|[0-9]):[0-5][0-9])|((0[0-9]|1[0-2]|[0-9]):[0-5][0-9]\s{0,1}(a|p|A|P)(m|M))|((0[0-9]|1[0-2]|[0-9]):[0-5][0-9]:[0-5][0-9]\s{0,1}(a|p|A|P)(m|M))|((0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9]:[0-5][0-9])|((0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9])
Validate hh:minmin:ss
Match examples:
- "09:03:05"
- "08 : 03 : 57"
- "24:00: 05"
Non-match examples:
- "17:2"
- "3:52"
Regular expression: (0\d|1\d|2[0-4]) ?: ?([0-5]\d)( ?: ?[0-5]\d)?
Matches numbers including scientific format
Match examples:
- "-23333.1e+24"
- "123"
- "34.2"
Non-match examples:
- "23333.01+24"
- "+123"
Regular expression: ^-?[1-9]\d*\.?(\d+([eE][-+]\d+)?)?$
Matches date in MM/DD/YYYY (USA Format). Allows for 1 or 2 digit month and day. Requires 4 digit year between 1900-2999. Allows for dash, slash, period or space for separators.
Match examples:
- "01/02/2015"
- "5-7-1915"
- "12.8.2035"
Non-match examples:
- "11-11-1845"
- "31/12/2000"
Regular expression: ^(0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$
matches dates within the correct ranges in US standard date formats MM/DD/YYYY
Match examples:
- "1/3/2017"
- "01/03/2017"
- "12/12/2017"
Non-match examples:
- "31/12/2017"
- "99/99/9999"
Regular expression: ^(1[0-2]|0[1-9]|[1-9])\/(1[0-9]|2[0-9]|3[0-1]|0[1-9]|[1-9])\/\d{4}$
Matches the format from www.cpr.dk and fixed to match 29th February for leap years
Match examples:
- "020955-2012"
- "020955-2012"
- "241283-1234"
Non-match examples:
- "459434-1234"
- "123456-1234"
Regular expression: ((((0[1-9]|[12][0-9]|3[01])(0[13578]|10|12)(\d{2}))|(([0][1-9]|[12][0-9]|30)(0[469]|11)(\d{2}))|((0[1-9]|1[0-9]|2[0-8])(02)(\d{2}))|((29)(02)(0(0|4|8)))|((29)(02)([2468][048]))|((29)(02)([13579][26])))[- ]?\d{4})
Matches phone numbers that start with +989, 09, 9
Match examples:
- "09221113344"
- "+989157097015"
- "09984114118"
Non-match examples:
- "09057614584"
- "210843631"
Regular expression: (\+989|9|09)(0[1-3]|1[0-9]|2[0-2]|3[0-9]|90|9[8-9])\d{7}
Matches integers between 0 and 9999999 that are multiples of 100.
Match examples:
- "100"
- "200"
- "9999900"
Non-match examples:
- "101"
- "201"
Regular expression: ^([1-9][0][0]|[1-9][0-9][0][0]|[1-9][0-9][0-9][0][0]|[1-9][0-9][0-9][0-9][0][0]|[1-9][0-9][0-9][0-9][0-9][0][0])$
match the "Unique Master Citizen Number" based on the wikipedia description.
It doesn't keep in account the checksum, but it matches the example on wikipedia.
Match examples:
- "0101006500006"
- "3112293253271"
- "3108125465983"
Non-match examples:
- "none"
- "#"
Regular expression: ((0[1-9]|[12]\d|3[01])(0[1-9]|1[0-2])\d{3}\d{2}\d{4})
Matches Notice to Airmen (NOTAM) coords and radius in "Q" field
Match examples:
- "440110N0123634E005"
- "63319S20302E264"
- "2226S0521E554"
Non-match examples:
- "any other format"
- "east"
Regular expression: ([0-8]?\d[0-5]?\d[0-5]?\d|900000)[NS]([0-1]?[0-7]?\d[0-5]?\d[0-5]?\d|1800000)[EW]\d{3}
Raw prompt:
Matches valid South African ID numbers based on all criteria (except of course the checksum digit at the end).
Matches the format defined as:
YYMMDDSSSSCAZ.
YY - Year,
MM - Month,
DD - Day,
SSSS - Gender,
C - Denotes citizenship (0 or a 1),
A - Always an 8,
Z - Checksum digit (doesn't validate if the checksum itself is valid).
Also supports the following ways of entering it:
YYMMDDSSSSCAZ |
YYMMDD SSSS CAZ |
YYMMDD SSSS CA Z .
Match examples:
- "9202204720082"
- "920220 4720 082"
- "920220 4720 08 2"
Non-match examples:
- "9202204720282"
- "920220 4720 052"
Regular expression: (((\d{2}((0[13578]|1[02])(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012])(0[1-9]|[12]\d|30)|02(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229))(( |-)(\d{4})( |-)([01]8((( |-)\d{1})|\d{1}))|(\d{4}[01]8\d{1}))
This takes an American date using mm-dd-yyyy format. It does not validate month or day values.
Match examples:
- "12-9-1969"
- "2-8-1998"
- "8-17-2002"
Non-match examples:
- "12-9-69"
- "12/2/1948"
Regular expression: ^\d{1,2}-\d{1,2}-\d{4}$
Match a float number with the exponent sign and f sign
Match examples:
- "2.0"
- "0.3"
- "-.4"
Non-match examples:
- "2"
- "234"
Regular expression: [\+-]?(([0-9]*\.[0-9]+|[0-9]+\.[0-9]*)([Ee][\+-]?[0-9]+)?[Ff]?|[0-9]+[Ff])
matches almost all programming language operators
Match examples:
- "++"
- "<="
- ">>="
Non-match examples:
- "identifier"
- "2000"
Regular expression: (<<=|>>=|&&=|(\|\|=)|<<|>>(\+=)|-=|(\*=)|(\/=)|%=|&=|(\^=)|(\|=)|<=|>=|==|!=|&&|(\|\|)|(\+\+)|--|>|<|\^|&|(\|)|\*|\/|%|\+|-|~|=)
Matches strings with 1-4 Lower case or Upper case letters with optional periods after each letter for a total of up to 8 possible characters.
Match examples:
- "J.W.R."
- "JwR"
- "j.r."
Non-match examples:
- "j..r."
- "jwers"
Regular expression: ^(?:[a-zA-Z]\.?){1,4}$
Matches mixed case, colon or hypen hexadecimal notation. Discards string too short or long, or with invalid characters.
Match examples:
- "98-CE-d0-a2-0a-68"
- "98:cE:d0:a2:0a:68"
- "BO:cX-32:d0-RS:C]"
Non-match examples:
- "98-cE-d0-a2-0a"
- "98-cE-d0-a2-0a-68-f0"
Regular expression: ^([\da-fA-f]{2}[:-]){5}[\da-fA-f]{2}$
Matches troy credit cards (length 16, prefix 9792)
Match examples:
- "9792131111111111"
- "9792461111111111"
- "9792111111111111"
Non-match examples:
- "9792 1311 1111 1111"
- "1234561234561234"
Regular expression: ^9792\d{12}$
This regex will match below values only
YES
yes
Yes
YEs
yEs
yeS
NO
no
No
nO
Match examples:
- "YES"
- "nO"
- "No"
Non-match examples:
- "Except YES yes Yes YEs yEs yeS NO no No nO"
- "3freds"
Regular expression: ^(?:Yes\b|No\b|yes\b|YES\b|YEs\b|yeS\b|yEs\b|NO\b|nO\b|no\b)
Matches strings of numbers with the following constraints
- first 2 digits are 01
- second 1 digit is 0 for (Vodafone) or 1 for (Etisalat) or 2 for (orange) or 5 for (We)
- third 8 digits are between 0 and 9
Match examples:
- "01022685544"
- "01229671351"
- "01208664788"
Non-match examples:
- "+0201622685544"
- "01322685544"
Regular expression: ^01[0125]{1}[0-9]{8}
Matches a positive integer with max length 10
Match examples:
- "2147483647"
- "0"
- "2147483639"
Non-match examples:
- "2147483648"
- "0.0"
Regular expression: ^(\d|\d{1,9}|1\d{1,9}|20\d{8}|21[0-3]\d{7}|214[0-6]\d{6}|2147[0-3]\d{5}|21474[0-7]\d{4}|214748[0-2]\d{3}|2147483[0-5]\d{2}|21474836[0-3][0-9]|214748364[0-7])$
Matches phone numbers starting with 03*********, for a total of 11 digits.
Match examples:
- "03355011998"
- "03285760882"
- "03331068752"
Non-match examples:
- "+923355011998"
- "-43r3442"
Regular expression: ^(0)((3[0-6][0-9]))(\d{7})$
This expression matches the YYYYMMDDHHMMSS date time format but also only the date YYYYMMDD. It does not control month length or leap years.
Match examples:
- "20200707181818"
- "20200707"
- "20200231010000"
Non-match examples:
- "20201232"
- "20201301"
Regular expression: ^[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])($|(([01][0-9]|2[0-3])[0-5][0-9][0-5][0-9])$)
Matches 7 digits (starting with 3,4,5,6,7,8,9), 8 digits (starting with 4,5,7,8), machine-to-machine (M2M) numbers 9-12 digits (starting with 8).
Match examples:
- "300 3000"
- "300-3000"
- "3003000"
Non-match examples:
- "3000 3000"
- "9000 9000 9000"
Regular expression: (^[3|4|5|6|7|8|9]\d{2}(\ |-){0,1}\d{4}$)|(^[4|5|7|8]\d{3}(\ |-){0,1}\d{4}$)|(^8\d{2,3}(\ |-){0,1}\d{3,4}(\ |-){0,1}\d{3,4}$)
Matches the hissing noise of a snake (string of any number of s more than 1).
Match examples:
- "ssssssssss wwwwwwwwwwwsssssssssssssssssss"
- "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"
- "ssssssssssssssssssssssssssssssssssssssssssssssssss"
Non-match examples:
- "effsgrgrsfefsv54543534544 FKR$>%>??W?EK#$Krkdk3oror"
- "qwertyghbn"
Regular expression: ([s]){10,}
Matches the "ing" in any word that ends with "ing"
Match examples:
- "Reading Playing Comforting Crying"
- "ing"
Non-match examples:
- "Readings Listenings Playful Comfort"
- "hi"
Regular expression: ([ing]){3}$
Matches 2 character HEX values between =
Match examples:
- "=EF=BB=BF"
- "=E2=9C=80"
- "=E2=9D=A4"
Non-match examples:
- "e2 9d a4"
- "ABCXYZ"
Regular expression: ((=)[A-F0-9]{2}){3}
Matches the PESEL number which is an identification number given to every Polish citizen when they are born and registered in Poland.
Match examples:
- "11083197485"
- "36110878229"
- "00063172200"
Non-match examples:
- "1F083297485"
- "36204578229"
Regular expression: \b[0-9]{2}([0][1-9]{1}|[1][0-2]{1})([0][1-9]{1}|[1][0-9]{1}|[2][0-9]{1}|[3][0-1]{1})\d{5}
Matches dates with years from 2020-2039
Match examples:
- "12/20"
- "12/39"
- "05-25"
Non-match examples:
- "12/40"
- "23/02"
Regular expression: ^((0[1-9])|(1[0-2]))[\/\.\-]*((2[0-9])|(3[0-9]))$
Matches strings of numbers of the length of at least 5, but can not have more than 4 5's consecutively
Match examples:
- "0000110000"
- "000010010"
- "158114223"
Non-match examples:
- "00000"
- "1122000009"
Regular expression: ^((?!.*(00000|11111|22222|33333|44444|55555|66666|77777|88888|99999))[0-9]{5,10})
Matches UK National Insurance number. The suffix needs to be a single character of A-D (as these are the only values currently supported by HMRC).
Match examples:
- "XY123456D"
- "AH587561C"
- "CZ106648B"
Non-match examples:
- "XY123456E"
- "23456"
Regular expression: (?!BG|GB|KN|NK|NT|TN|ZZ)[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z][0-9]{6}[A-D]