expression
stringlengths 4
1.37k
| raw_prompt
stringlengths 11
1.08k
| refined_prompt
stringlengths 79
906
| matches
sequence | non_matches
sequence | id
int64 1
4.11k
|
---|---|---|---|---|---|
^[+]?\d*$ | This re was used for set numbers only!
Somente numeros são requeridos! | It validates numeric values, including positive integers with or without a leading plus sign.
Match examples:
- "0123456789"
- "1234"
- "1"
Non-match examples:
- "1.0?&"
- "a1" | [
"0123456789",
"1234",
"1",
"243",
"513",
"245",
"89456",
"98456",
"845",
"89456",
"984568",
"+98",
"+4846"
] | [
"1.0?&",
"a1",
"2a-",
"12/123/4322",
"234/423/5243",
"43.v234",
"43-5432",
"/5/5/20022",
"432/524/2435",
"1-1-2",
"34.31",
"32542.456"
] | 231 |
^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$ | Regular expression to match valid UK postcodes.
In the UK postal system not all letters are used in all positions (the same with vehicle registration plates) and there are various rules to govern this. This regex takes into account those rules.
Details of the rules:
First half of postcode
Valid formats
[A-Z][A-Z][0-9][A-Z]
[A-Z][A-Z][0-9][0-9]
[A-Z][0-9][0-9]
[A-Z][A-Z][0-9]
[A-Z][A-Z][A-Z]
[A-Z][0-9][A-Z]
[A-Z][0-9]
Exceptions
Position - First.
Contraint - QVX not used
Position - Second.
Contraint - IJZ not used except in GIR 0AA
Position - Third.
Constraint - AEHMNPRTVXY only used
Position - Forth.
Contraint - ABEHMNPRVWXY
Second half of postcode
Valid formats
[0-9][A-Z][A-Z]
Exceptions
Position - Second and Third.
Contraint - CIKMOV not used | Regular expression to match valid UK postcodes.
In the UK postal system not all letters are used in all positions (the same with vehicle registration plates) and there are various rules to govern this. This regex takes into account those rules.
Details of the rules:
First half of postcode
Valid formats
[A-Z][A-Z][0-9][A-Z]
[A-Z][A-Z][0-9][0-9]
[A-Z][0-9][0-9]
[A-Z][A-Z][0-9]
[A-Z][A-Z][A-Z]
[A-Z][0-9][A-Z]
[A-Z][0-9]
Exceptions
Position - First.
Contraint - QVX not used
Position - Second.
Contraint - IJZ not used except in GIR 0AA
Position - Third.
Constraint - AEHMNPRTVXY only used
Position - Forth.
Contraint - ABEHMNPRVWXY
Second half of postcode
Valid formats
[0-9][A-Z][A-Z]
Exceptions
Position - Second and Third.
Contraint - CIKMOV not used
Match examples:
- "DN3 6GB"
- "SW42 4RG"
- "GIR 0AA"
Non-match examples:
- "SEW4 5TY"
- "AA2C 4FG" | [
"DN3 6GB",
"SW42 4RG",
"GIR 0AA",
"W6V3 9HE",
"O75 4QQ",
"NA9 2XS",
"8O 1XO",
"TYV 2RH",
"418N 1HH",
"IPVA 2YP",
"S4 5XU",
"1MN 4WL",
"MY5 8XW"
] | [
"SEW4 5TY",
"AA2C 4FG",
"AA2 4CV",
"Mastercard",
"POST code",
"there is a boy",
"43-5432",
"/5/5/20022",
"SIUE 234",
"FJD28r9 ISOJD342",
"FDSD79",
"998F FD7329"
] | 234 |
^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$ | Accepts data of time in format h:mm and hh:mm
^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$
in php [0-23]:[0-59]{2} (posix) | Accepts data of time in format h:mm and hh:mm
Match examples:
- "0:00"
- "23:00"
- "00:59"
Non-match examples:
- "0:0"
- "24:00" | [
"0:00",
"23:00",
"00:59",
"22:12",
"4:15",
"22:26",
"22:14",
"16:39",
"06:45",
"14:56",
"1:25",
"7:49",
"22:53"
] | [
"0:0",
"24:00",
"00:60",
"12/123/4322",
"51:534",
"432:2834",
"234:94",
"98:43",
"132:43",
"23:98",
"54:84",
"0943:423"
] | 235 |
^((0[1-9])|(1[0-2]))\/(\d{2})$ | Validates MM/YY for rough checking credit card expiration dates. | Validates MM/YY for rough checking credit card expiration dates.
Match examples:
- "11/03"
- "01/04"
- "09/39"
Non-match examples:
- "13/03"
- "10/2003" | [
"11/03",
"01/04",
"09/39",
"08/67",
"10/96",
"03/67",
"04/71",
"12/88",
"12/33",
"12/48",
"11/15",
"10/28",
"08/03"
] | [
"13/03",
"10/2003",
"234/234",
"342/52",
"23/52",
"25/14",
"24/14",
"05/243",
"432/52",
"24/756",
"87/67",
"85/83"
] | 236 |
^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$ | This regex is to validate the time of a ~60 minute CD where the most time on the CD is 59:59 (minutes:seconds). It is derived from Ken Madden's time regex for a project for Erik Porter (Windows/Web guru). Written by Jason Gaylord. | This regex is to validate the time of a ~60 minute CD where the most time on the CD is 59:59 (minutes:seconds).
Match examples:
- "30:05"
- "5:05"
- "02:59"
Non-match examples:
- "25:7"
- "5m:16" | [
"30:05",
"5:05",
"02:59",
"52:55",
"6:33",
"40:13",
"5:35",
"9:28",
"9:05",
"3:32",
"54:49",
"10:17",
"7:50"
] | [
"25:7",
"5m:16",
"60:60",
"12/123/4322",
"51:534",
"$23.454",
"4556:45",
"98i:ojk",
"000-000",
"1-1-2",
"34.31",
"423:4561"
] | 244 |
^\$?(\d{1,3},?(\d{3},?)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{2})?)$ | Expression to handle US currency entry in .NET. Handy for regular expression validation controls where the user can be entering in a currancy value but you can't control explict entry values. Will accept a wide variety of values that can be easy cast to a double via the CDbl function. Expression is also compatible with default US string format for currency. | In summary, this regular expression matches strings that start with a dollar sign, followed by a group of one to three digits, optionally followed by a comma, optionally followed by a group of three digits, optionally followed by a decimal point and one to three digits, or a group of one to three digits followed by an optional decimal point and two digits.
Match examples:
- "10000"
- "10,000"
- "$1,000.00"
Non-match examples:
- "0.002"
- "x.0" | [
"10000",
"10,000",
"$1,000.00",
"$834",
"$498",
"$489",
"$129",
"15,846",
"48357",
"84667",
"84694",
"84215",
"48583"
] | [
"0.002",
"x.0",
"-243",
"12/123/4322",
"51:534",
"$23.454a",
"43-5432",
"/5/5/20022",
"000-000",
"354/243/542",
"(0xx12) 62509",
"++63453.345"
] | 249 |
^(?![0-9]{6})[0-9a-zA-Z]{6}$ | matches a six character "password" that has to consist of numbers and letters with at least one letter in it. | Matches a six character "password" that has to consist of numbers and letters with at least one letter in it.
Match examples:
- "123a12"
- "a12345"
- "aaaaaa"
Non-match examples:
- "111111"
- "123456" | [
"123a12",
"a12345",
"aaaaaa",
"W0lkZQ",
"LMCawM",
"DUcHPR",
"NSjtUp",
"cnzkKl",
"lWtVJH",
"7zLHU1",
"1uaPEv",
"DkGtDA",
"9QJvZZ"
] | [
"111111",
"123456",
"89456",
"9485632",
"98561",
"984651",
"gdfs9465",
"49865f956",
"956gdfg",
"g48",
"fg4d851",
"g98456gf"
] | 251 |
^\(?[\d]{3}\)?[\s-]?[\d]{3}[\s-]?[\d]{4}$ | This regular expression matches 10 digit US Phone numbers in different formats. Some examples are
1)area code in paranthesis.
2)space between different parts of the phone number.
3)no space between different parts of the number.
4)dashes between parts. | This regular expression matches 10 digit US Phone numbers in different formats. Some examples are
1)area code in paranthesis.
2)space between different parts of the phone number.
3)no space between different parts of the number.
4)dashes between parts.
Match examples:
- "(573)8841878"
- "573-884-1234"
- "573 234 1256"
Non-match examples:
- "(573)(673)2345"
- "573-12-2345" | [
"(573)8841878",
"573-884-1234",
"573 234 1256",
"5169670650",
"3751905240",
"156763 5387",
"895\t344
4357",
"(940) 698 6344",
"7547900898",
"8943744511",
"4699973928",
"(856)1030219",
"9555048285"
] | [
"(573)(673)2345",
"573-12-2345",
"53495083409x",
"12/123/4322",
"2346-2345-2435",
"r4532",
"15343454",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"(0xx12) 62509",
"12/132/90"
] | 255 |
(^[A-ZÀ-Ü]{1}[a-zà-ü']+\s[a-zA-Zà-üÀ-Ü]+((([\s\.'])|([a-zà-ü']+))|[a-zà-ü']+[a-zA-Zà-üÀ-Ü']+)) | Checks if has the first and the last name, and check the capital letters.
Use with the RegExp.test method | Checks if has the first and the last name, and check the capital letters.
Match examples:
- "Carlos Rodrigues"
- "Cá de Laaa"
- "Crras R. L. Rodrigües"
Non-match examples:
- "aaäA"
- "E:\DyAGT\SD01A_specV2.jpg" | [
"Carlos Rodrigues",
"Cá de Laaa",
"Crras R. L. Rodrigües",
"Fsdf Ffasd",
"Lionel Messi",
"Abc Def",
"Qwef Nfjisdo",
"Jfdio Jijosdf",
"Fijofds Jijsdf",
"Jpfods Pfds",
"Jfodis Prew",
"Qeybr Pfds",
"Ifisdoj Idsf"
] | [
"aaäA",
"E:\\DyAGT\\SD01A_specV2.jpg",
"53495083409x",
"[email protected]@",
"sfalijad234",
"3nf@",
"AAAAAAA",
"2546dgwre",
"[email protected]",
"com.edu.github",
"sda sad",
"0j0jweBBBB"
] | 262 |
(^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19)|([2]([0]{1})))([0-9]{2}))))$) | dd/mm/yy
Check dates between 1/1/1900 - 31/12/2099 | dd/mm/yy
Check dates between 1/1/1900 - 31/12/2099
Match examples:
- "31/12/2099"
- "1/1/1900"
- "10/12/2003"
Non-match examples:
- "05/11/3000"
- "11/13/2003" | [
"31/12/2099",
"1/1/1900",
"10/12/2003",
"5/2/1987",
"30/1/16",
"7/03/1942",
"9/2/19",
"15/6/1909",
"30/1/1975",
"2/07/1934",
"05/5/61",
"06/11/97",
"30/11/94"
] | [
"05/11/3000",
"11/13/2003",
"32/04/2030",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"/5/5/5",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"9/9/9",
"12/132/90"
] | 263 |
^[0-9]{4}\s{0,2}[a-zA-z]{2}$ | Dutch postalcode expression. 4 digits followed by max. two spaces end ending on two letters. | Dutch postal code expression. 4 digits followed by max. two spaces end ending on two letters.
Match examples:
- "4006 AB"
- "4006ab"
- "4006 AB"
Non-match examples:
- "4006.ab"
- "4006_ab" | [
"4006 AB",
"4006ab",
"4006 AB",
"0048 VS",
"4894fj",
"4893fj",
"8238fj",
"8392jg",
"9584jq",
"9381oq",
"9384jv",
"8271pq",
"0495ue"
] | [
"4006.ab",
"4006_ab",
"4006/ab",
"[email protected]@",
"2346-2345-2435",
"2/3/5235",
"43-5432",
"4321fgd",
"7689fgds",
"890gss",
"9/9/9",
"99999@gmail"
] | 271 |
^([\(]{1}[0-9]{3}[\)]{1}[ |\-]{0,1}|^[0-9]{3}[\-| ])?[0-9]{3}(\-| ){1}[0-9]{4}$ | Validates US phone numbers. Phone number can be delimited with dashes or spaces. Area code can optionally include parentheses. To optionally validate area codes, try this expression.
^([\(]{1}[0-9]{3}[\)]{1}[ |\-]{0,1}|^[0-9]{3}[\-| ])?[0-9]{3}(\-| ){1}[0-9]{4}$ | Validates US phone numbers. Phone number can be delimited with dashes or spaces. Area code can optionally include parentheses.
Match examples:
- "(111) 223-2332"
- "(222)233-2332"
- "232-323-3233"
Non-match examples:
- "(ddd) 223-2332"
- "222-232/2333" | [
"(111) 223-2332",
"(222)233-2332",
"232-323-3233",
"055 8723",
"952 944 8379",
"037 698-1393",
"(767)-015 9062",
"879 908-0891",
"(879)-830-4814",
"(759) 122-5045",
"440-6179",
"(654)-789-2442",
"937 208-8233"
] | [
"(ddd) 223-2332",
"222-232/2333",
"322-3223-222",
"12/123/4322",
"2346-2345-2435",
"2/3/5235",
"48-895-956",
"51962-9516-956",
"9516-9516",
"89-956",
"956195-9516",
"9561-56"
] | 273 |
^(([1-9]|[0-2]\d|[3][0-1])\.([1-9]|[0]\d|[1][0-2])\.[2][0]\d{2})$|^(([1-9]|[0-2]\d|[3][0-1])\.([1-9]|[0]\d|[1][0-2])\.[2][0]\d{2}\s([1-9]|[0-1]\d|[2][0-3])\:[0-5]\d)$ | Correct German DateTime. Does not check leap year rules!
Possible Formats of date part:
D.M.YYYY or D.MM.YYYY or DD.MM.YYYY or DD.M.YYYY
Possible formats of time part:
h:mm or hh:mm | Correct German DateTime. Does not check leap year rules!
Possible Formats of date part:
D.M.YYYY or D.MM.YYYY or DD.MM.YYYY or DD.M.YYYY
Possible formats of time part:
h:mm or hh:mm
Match examples:
- "20.10.2003 08:10"
- "24.12.2003"
- "1.1.2004 8:15"
Non-match examples:
- "25.13.2004"
- "20.10.2003 08:9" | [
"20.10.2003 08:10",
"24.12.2003",
"1.1.2004 8:15",
"23.11.2048 01:58",
"31.7.2051",
"30.00.2030",
"30.9.2022 16:34",
"27.12.2031
18:40",
"19.11.2057",
"9.03.2014",
"02.02.2097 1:22",
"31.8.2074",
"30.09.2014 11:18"
] | [
"25.13.2004",
"20.10.2003 08:9",
"34f2vf42e",
"12/123/4322",
"2346-2345-2435",
"2/3/5235",
"43-5432",
"12f3.21f3.213f",
"432/524/2435",
"354/243/542",
"(0xx12) 62509",
"12/132/90"
] | 278 |
\d{2}.?\d{3}.?\d{3}/?\d{4}-?\d{2} | This regular expressions matches CNPJ number. CNPJ is a Registration Number of Brazilian Companies. | This regular expressions matches CNPJ number. CNPJ is a Registration Number of Brazilian Companies.
Match examples:
- "00.000.000/0000-00"
- "00000000000000"
- "657552683148-18"
Non-match examples:
- "00-000-000-000-00"
- "AA.AAA.AAA/AAAA-AA" | [
"00.000.000/0000-00",
"00000000000000",
"657552683148-18",
"72C323,924/6687-31",
"01978870/5388-07",
"67443_322/861928",
"28X041&249/3893-37",
"18_904\"821/4142-53",
"52632y804276173",
"39890X500/784223",
"29N3068138/5854-57",
"55732078/883708",
"74%9586365619-89"
] | [
"00-000-000-000-00",
"AA.AAA.AAA/AAAA-AA",
"34f2vf42e",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"12f3.21f3.213f",
"[email protected]",
"354/243/542",
"9/9/9",
"++63453.345"
] | 282 |
^((\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)$ | Date expression validator with format YYMMDD
Validates leap years.
Of course, as year has only 2 digits, it's not possible to invalidate years like 2100, 2200, 2300, etc as a non-leap years ! | Date expression validator with format YYMMDD, validates leap years. As year has only 2 digits, it's not possible to invalidate years like 2100, 2200, 2300, etc as a non-leap years.
Match examples:
- "751231"
- "000229"
- "040229"
Non-match examples:
- "750431"
- "010229" | [
"751231",
"000229",
"040229",
"360229",
"920229",
"500401",
"530216",
"960229",
"241021",
"541001",
"801115",
"900101",
"160229"
] | [
"750431",
"010229",
"050229",
"895612",
"415625",
"451625",
"8745465",
"9456456",
"145561",
"456897",
"4561fd",
"84561fs"
] | 285 |
^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$ | Email address validator. Should cover most of RFC 822, including unusual (but still valid) addresses. Does not restrict the top level domain size, but you're better off doing an nslookup or similar if you absolutely must have a valid domain. Accepts IP Addresses instead of the domain, with or without brackets. Believe it or not, this one is valid: !#$%^&*-+~/'`|{}@xyz.com
Sorry looks like this site is mangling the quote and ampersand characters - you'll have to fix that yourself. | Email address validator. Should cover most of RFC 822, including unusual (but still valid) addresses. Does not restrict the top level domain size, but you're better off doing an nslookup or similar if you absolutely must have a valid domain. Accepts IP Addresses instead of the domain, with or without brackets. Believe it or not, this one is valid: !#$%^&*-+~/'`|{}@xyz.com
Match examples:
- "/A/Wacky/[email protected]"
- "bob.builder@[1.1.1.1]"
- ""blah b. blahburger"@blah.com"
Non-match examples:
- "./A/Wacky/[email protected]"
- "bob.builder@[256.1.1.1]" | [
"/A/Wacky/[email protected]",
"bob.builder@[1.1.1.1]",
"\"blah b. blahburger\"@blah.com",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]"
] | [
"./A/Wacky/[email protected]",
"bob.builder@[256.1.1.1]",
"-\"blah b. blahburger\"@blah.com",
"[email protected]@",
"sfalijad234",
"3nf@@",
"@#dfkjnav",
"2546dgwre@@",
"432/524/2435",
"(0xx12) 7256 2345154",
"(0xx12) 62509@",
"99999@gmail@@"
] | 287 |
^(\d|-)?(\d|,)*\.?\d*$ | Input for Numeric values. Handles negatives, and comma formatted values. Also handles a single decimal point | Input for Numeric values. Handles negatives, and comma formatted values. Also handles a single decimal point
Match examples:
- "5,000"
- "-5,000"
- "100.044"
Non-match examples:
- "abc"
- "Hundred" | [
"5,000",
"-5,000",
"100.044",
"8",
"9",
"4",
"5",
"54",
"486",
"184",
"735",
"48.48",
"485"
] | [
"abc",
"Hundred",
"1.3.4",
"-123afds",
"234/423/5243",
"2/3/5235",
"43-5432",
"12f3.21f3.213f",
"245/524/12",
"adfa2",
"34.31afd",
"99999@gmail"
] | 288 |
^[1-9]+[0-9]*$ | Allows only positive integers that are greater then 0. Easily modified for +/- intergers and allowing zero. | ^[1-9]+[0-9]*$
Match examples:
- "1"
- "12"
- "124"
Non-match examples:
- "-1"
- "a" | [
"1",
"12",
"124",
"489",
"4985",
"45",
"459",
"561",
"456",
"54",
"798",
"4895",
"13"
] | [
"-1",
"a",
"1.0",
"845-",
"49516-fwfd",
"2/3/5235",
"43-5432",
"12f3.21f3.213f",
"432/524/2435",
"341.431v4f3.fv1",
"34.31451",
"32542gdf"
] | 289 |
^(([a-z])+.)+[A-Z]([a-z])+$ | This matches Java class names such as "com.test.Test". It's being used within an XML Schema to validate classname as specified in XML documents. | Matches strings that start with one or more groups of lowercase letters followed by a dot and end with an uppercase letter followed by one or more lowercase letters. This matches Java class names such as "com.test.Test". It's being used within an XML Schema to validate classname as specified in XML documents.
Match examples:
- "com.test.Test"
- "com.Test"
- "afd.Tds"
Non-match examples:
- "com.test.test"
- "com.test.TEst" | [
"com.test.Test",
"com.Test",
"afd.Tds",
"fds.adfs.Tfds",
"fdsioj.fdso.Tdfs",
"apple.banana.Class",
"sdaf.fa.Osdfa",
"fqidf.fdsi.Fdsa",
"run.ran.Run",
"apple.apple.Apple",
"name.abc.Cds",
"dfisf.Fds",
"jdif.Irw"
] | [
"com.test.test",
"com.test.TEst",
"Com.test.Test",
"Mastercard",
"123.456.789",
"2/3/5235",
"afdsFDS",
"FDS.FDsfd.dsf",
"fgdg.dgf.fgsd",
"gfd.gfd.gdf",
"Rwer.wer.Fds",
"gfdgf.WERfdg.FDS"
] | 294 |
^[a-zA-Z_][a-zA-Z0-9_]*$ | Matches variable names/identifier from C# (and most other languages) | Matches variable names/identifier from C# (and most other languages). This regular expression ensures that a string:
Starts with a letter (either uppercase or lowercase) or an underscore.
Followed by zero or more letters (uppercase or lowercase), digits, or underscores.
Enforces these rules for the entire string, not just a part of it.
Match examples:
- "VariableName"
- "i"
- "Some_Value_3"
Non-match examples:
- "3ID"
- "Hello World" | [
"VariableName",
"i",
"Some_Value_3",
"afds9",
"sfjdio98",
"jifds89u",
"f9jdis",
"_98fdsj",
"jifd89",
"jisdf98",
"jifds09",
"j8fid09",
"jifdqwe"
] | [
"3ID",
"Hello World",
"jfdiosj sjfkljs",
"j90u9u sfdijo",
"908sfjkj sjdifoj",
"98jfdsk",
"908fjids",
"9wrer",
"9apple",
"fijd8j8j j8fjds",
"jifdj8j 8sdf j",
"notre dame"
] | 295 |
^((4\d{3})|(5[1-5]\d{2}))(-?|\040?)(\d{4}(-?|\040?)){3}|^(3[4,7]\d{2})(-?|\040?)\d{6}(-?|\040?)\d{5} | Credit card validator for AMEX, VISA, MasterCard only. Allows spaces, dashes, or no separator between digit groups according to the layout (4-6-5 for AMEX, 4-4-4-4 for Visa and Mastercard) | Credit card validator for AMEX, VISA, MasterCard only. Allows spaces, dashes, or no separator between digit groups according to the layout (4-6-5 for AMEX, 4-4-4-4 for Visa and Mastercard)
Match examples:
- "3711-078176-01234"
- "4123 5123 6123 7123"
- "5123412361237123"
Non-match examples:
- "3711-4123-5123-6112"
- "52/2/54/245" | [
"3711-078176-01234",
"4123 5123 6123 7123",
"5123412361237123",
"526837376552 0992",
"5552 43417106 3775",
"3756-994651 29766",
"483274536109 3049",
"3495 24794717789",
"3790685951 52358",
"3769781961 92352",
"345339087687813",
"379590296125359",
"341745514648436"
] | [
"3711-4123-5123-6112",
"52/2/54/245",
"2534/52435234/2453",
"12/123/4322",
"2346-2345-2435afsd",
"2/3/5235",
"/5/5/5",
"/5/5/20022",
"432/524/2435",
"1-1-2",
"(0xx12) 62509",
"12/132/90"
] | 299 |
^((\d?)|(([-+]?\d+\.?\d*)|([-+]?\d*\.?\d+))|(([-+]?\d+\.?\d*\,\ ?)*([-+]?\d+\.?\d*))|(([-+]?\d*\.?\d+\,\ ?)*([-+]?\d*\.?\d+))|(([-+]?\d+\.?\d*\,\ ?)*([-+]?\d*\.?\d+))|(([-+]?\d*\.?\d+\,\ ?)*([-+]?\d+\.?\d*)))$ | This allows a sequence of real numbers to be added, separated by a comma (required) and a space (optional). Based pretty heavily on an expression by Steven Smith on this site. | This allows a sequence of real numbers to be added, separated by a comma (required) and a space (optional).
Match examples:
- "8.0"
- "8.0,-.38,+8.9"
- "8.0, +8.8, 0.09"
Non-match examples:
- "+"
- "." | [
"8.0",
"8.0,-.38,+8.9",
"8.0, +8.8, 0.09",
"4894",
"48956.456",
"56.4895",
"645.489",
"456.4895",
"465",
"489",
"15",
"48",
"46"
] | [
"+",
".",
"a,b, c",
"12/123/4322",
"123.456.789",
"43.v234",
"@#dfkjnav",
"12f3.21f3.213f",
"432/524/2435",
"(0xx12) 7256 2345154",
"(0xx12) 62509",
"99999@gmail"
] | 300 |
^(.|\n){0,16}$ | Limit Length - limit the length of a text box or other area to contain any character plus new line | Matches strings containing up to 16 characters, including newline characters. It allows any combination of characters and newlines within this limit.
Match examples:
- "shorter than max"
- "sgfdij"
- "jiodfk90"
Non-match examples:
- "string longer than max"
- "9uionjy89ubih8bhuk78byu" | [
"shorter than max",
"sgfdij",
"jiodfk90",
"(JIOFDS",
"h8uijnkdfs",
"9ijknsd",
"ijnkfdiok",
"iojkfgij3",
"ijo9ijotygv",
"0u9ioj",
"87yuhi",
"78ugij",
"78"
] | [
"string longer than max",
"9uionjy89ubih8bhuk78byu",
"b8uy8ikuhiuij,kuhb",
"78yguh78guibjhghjjvjhk",
"uhijuhijknuhijk9y8huijgui",
"78giu78ogyu78gyu5drutcf78gyhu",
"ugib89guilb78tgoyhuvogyhuv7ygohu",
"guihbj8guij b8 uij uohijk",
"uhij9 uij6f7 tuygd6 tuygh9 huijk",
"9huijkuhijlkuibjlkguibj",
"gy8ibhjg8yuhbjguibjkujk",
"giftygjn8guijbhiojkhijnk"
] | 308 |
^([a-zA-Z]\:)(\\[^\\/:*?<>"|]*(?<![ ]))*(\.[a-zA-Z]{2,6})$ | Matches filenames.
UPDATED on 1st Jan 2004. | Matches filenames that follow the pattern of a Windows file path, consisting of a drive letter, a path within the drive, and a file extension.
Match examples:
- "C:\di___r\fi_sysle.txt"
- "c:\dir\filename.txt"
- "d:\dir\fads.abc"
Non-match examples:
- "c:\dir\file?name.txt"
- "c:\f34fvfv" | [
"C:\\di___r\\fi_sysle.txt",
"c:\\dir\\filename.txt",
"d:\\dir\\fads.abc",
"d:\\dir\\agd.txt",
"d:\\dir\\gas.org",
"D:\\di___r\\fi_sysle.png",
"D:\\dir\\fi_sysle\\afd.cat",
"D:\\di___r\\abas.def",
"E:\\di_fadsf__r\\abas.afd",
"E:\\dgha\\abas.afd",
"E:\\asdg\\dsag.com",
"E:\\baqe\\afd.efg",
"E:\\baf\\vds.abd"
] | [
"c:\\dir\\file?name.txt",
"c:\\f34fvfv",
"c:\\34f2vf42e",
"c:\\[email protected]@",
"c:\\2346-2345-2435",
"c:\\2/3/5235",
"c:\\@#dfkjnav",
"c:\\12f3.21f3.213f",
"c:\\[email protected]",
"c:\\(0xx12) 7256 2345154",
"c:\\sda sad",
"c:\\99999@gmail"
] | 312 |
^(([0-9])|([0-1][0-9])|([2][0-3])):?([0-5][0-9])$ | For testing 24H based time entry. Tests if there is a colon to separate the hours from the minutes | Match and validate time in a 24-hour format (hh:mm). It allows for hours ranging from 0 to 23 and minutes ranging from 00 to 59. The colon (":") between hours and minutes is optional, and the regex ensures that the input conforms to this specific time format.
Match examples:
- "0959"
- "959"
- "9:59"
Non-match examples:
- "90"
- "960" | [
"0959",
"959",
"9:59",
"534",
"825",
"2332",
"542",
"645",
"23:24",
"17:26",
"23:36",
"8:48",
"2:18"
] | [
"90",
"960",
"24:00",
"12/123/4322",
"23441",
"999",
"978",
"9789",
"97899",
"897-",
"9/9/9",
"32542"
] | 315 |
^0(6[045679][0469]){1}(\-)?(1)?[^0\D]{1}\d{6}$ | Validates Austrian Cellular Phone Numbers. Works with ONE, T-Mobile, A1, Telering and new Provider "Drei". WITHOUT Country Code Verification. | Match and validate a specific pattern within a string:
It starts with a "0."
Followed by a pattern that consists of "6" followed by one character from the set [045679], followed by another character from the set [0469]. This pattern occurs exactly once.
There is an optional hyphen ("-").
There is an optional "1."
Followed by a single character that is not "0" or a non-digit character.
Ends with six digits.
Match examples:
- "0664-1234567"
- "06641234567"
- "0699-11234567"
Non-match examples:
- "06991-1234567"
- "+43650-1234567" | [
"0664-1234567",
"06641234567",
"0699-11234567",
"0670-2491611",
"06748693086",
"0674-3182376",
"0669-18315672",
"06063847671",
"0670-18703482",
"0649-1102467",
"06961945088",
"06902583647",
"0606-5415789"
] | [
"06991-1234567",
"+43650-1234567",
"07661234567",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"/5/5/20022",
"245/524/12",
"(0xx12) 7256 2345154",
"(0xx12) 62509",
"++63453.345"
] | 317 |
^1?[1-9]$|^[1-2]0$ | Matches a whole number between 1 and 20 inclusively | Matches a whole number between 1 and 20 inclusively
Match examples:
- "1"
- "11"
- "20"
Non-match examples:
- "0"
- "21" | [
"1",
"11",
"20",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13"
] | [
"0",
"21",
"165",
"156",
"45651",
"456",
"56",
"165798",
"48561",
"4516",
"51",
"9786"
] | 318 |
^[1-9][0-9]{3}\s?[a-zA-Z]{2}$ | Validates Dutch Postal Codes (ZipCode). There was a previous one listed here, but it's not entirely correct. Namely that dutch postal codes can contain a zero but cannot start with one, so this one is the adjusted version. | Validates Dutch Postal Codes (ZipCode).
Match examples:
- "1234AB"
- "1234 AB"
- "1001 AB"
Non-match examples:
- "0123AB"
- "1234A B" | [
"1234AB",
"1234 AB",
"1001 AB",
"1730 st",
"3054 Ue",
"7278SY",
"4669fb",
"9708zV",
"6899
jQ",
"2098az",
"4552fJ",
"2713mG",
"5881Be"
] | [
"0123AB",
"1234A B",
"0123 AB",
"12/123/4322",
"sfalijad234",
"43.v234",
"43-5432",
"98iojk",
"324df",
"adfa2",
"sda sad",
"3409fjg43"
] | 320 |
^([0-9]*|\d*\.\d{1}?\d*)$ | Accept only (0-9) integer and one decimal point(decimal point is also optional).After decimal point it accepts at least one numeric .This will be usefull in money related
fields or decimal fields. | Accept only (0-9) integer and one decimal point(decimal point is also optional).After decimal point it accepts at least one numeric .This will be usefull in money related
fields or decimal fields.
Match examples:
- ".568"
- "8578"
- "1234567.1234567"
Non-match examples:
- "568."
- "56.89.36" | [
".568",
"8578",
"1234567.1234567",
"65",
"465",
"465.456",
"87.98",
"846.48",
"465.48",
"8456.486",
"849.78",
"896",
"1623"
] | [
"568.",
"56.89.36",
"5.3.6.9.6",
"12/123/4322",
"123.456.789",
"43.v234",
"43-5432",
"12f3.21f3.213f",
"245/524/12",
"1-1-2",
"(0xx12) 62509",
"++63453.345"
] | 321 |
^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$ | DateTime Validator. | DateTime Validator.
Date Validation:
Validates dates in various formats (e.g., DD/MM/YYYY, DD-MM-YYYY, DD.MM.YYYY).
Supports both leap years and non-leap years.
Ensures valid months (1-12) and days (1-31) based on the selected month.
Validates year ranges from 1600 to 9999.
Time Validation:
Validates time in 12-hour or 24-hour format.
Supports optional seconds.
Validates hours (1-12 in AM/PM format or 0-23 in 24-hour format) and minutes (0-59).
Match examples:
- "12/25/2003"
- "08:03:31"
- "02/29/2004 12 AM"
Non-match examples:
- "02/29/2003 1:34 PM"
- "13:23 PM" | [
"12/25/2003",
"08:03:31",
"02/29/2004 12 AM",
"12/26/2003",
"12/25/2008",
"11/25/2003",
"08:04:31",
"08:03:32",
"09:03:31",
"02/28/2004 12 AM",
"02/29/2008 12 AM",
"02/24/2004 12 AM",
"02/29/2012"
] | [
"02/29/2003 1:34 PM",
"13:23 PM",
"24:00:00",
"12/123/4322",
"234/423/5243",
"2/3/5235 1:12",
"/5/5/5 12 AM",
"/5/5/20022",
"432/524/2435 12 AM",
"1-1-2 1:12",
"9/9/9 12 AM",
"12/132/90 1:12"
] | 322 |
^((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))$|^([01]\d|2[0-3])(:[0-5]\d){0,2}$ | This RE validates times patterns. | Validates time input in either 12-hour (with AM/PM) or 24-hour formats, allowing for optional minutes and seconds.
Match examples:
- "1 AM"
- "23:00:00"
- "5:29:59 PM"
Non-match examples:
- "13 PM"
- "13:60:00" | [
"1 AM",
"23:00:00",
"5:29:59 PM",
"12:07:52 PM",
"22:43",
"8 AM",
"12:42 AM",
"11:11 PM",
"08:50 AM",
"04:09",
"11 AM",
"03:01 PM",
"6:35 PM"
] | [
"13 PM",
"13:60:00",
"00:00:00 AM",
"12:97",
"15:97",
"32:78",
"5:978",
"/5/5/20022",
"000-000",
"1-1-2",
"34.31",
"12/132/90"
] | 323 |
^(#){1}([a-fA-F0-9]){6}$ | Matches HTML Color strings. Like #FFFFFF is white and #000000 is black and #FF0000 is red and so on... | Matches HTML Color strings.
Match examples:
- "#FFFFFF"
- "#FF3421"
- "#00FF00"
Non-match examples:
- "232323"
- "f#fddee" | [
"#FFFFFF",
"#FF3421",
"#00FF00",
"#D90e0F",
"#7Ac136",
"#CeE1eB",
"#3D1f8d",
"#462d56",
"#0e6307",
"#2a6Eef",
"#8beB0c",
"#e59d3c",
"#4aafdc"
] | [
"232323",
"f#fddee",
"#fd2",
"Mastercard",
"sfalijad234",
"43.v234",
"43-5432",
"2546dgwre",
"000-000",
"354/243/542",
"abc111def",
"32542"
] | 325 |
(((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)([/])(\d{4}))|((29)(\.|-|\/)(02)([/])([02468][048]00))|((29)([/])(02)([/])([13579][26]00))|((29)([/])(02)([/])([0-9][0-9][0][48]))|((29)([/])(02)([/])([0-9][0-9][2468][048]))|((29)([/])(02)([/])([0-9][0-9][13579][26]))) | Date in DD/MM/YYYY format.
Fecha en formato DD/MM/AAAA. | Date in DD/MM/YYYY format.
Match examples:
- "28/12/2003"
- "28/02/2003"
- "29/02/2000"
Non-match examples:
- "28-02-2003"
- "30/02/2003" | [
"28/12/2003",
"28/02/2003",
"29/02/2000",
"29/02/3200",
"29/02/5676",
"29/02/6608",
"21/02/8399",
"01/11/2510",
"29/02/7032",
"29/02/1504",
"13/02/4580",
"30/10/0687",
"29/02/9288"
] | [
"28-02-2003",
"30/02/2003",
"28.02.2003",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"/5/5/5",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"9/9/91341",
"12/132/90"
] | 327 |
(^[0-9]{1,8}|(^[0-9]{1,8}\.{0,1}[0-9]{1,2}))$ | Matches number in format XX.XX Please note that this expression allows maximum of 8 digits before the dot and 2 (optional) digits after the dot. | Matches number in format XX.XX Please note that this expression allows maximum of 8 digits before the dot and 2 (optional) digits after the dot.
Match examples:
- "1.00"
- "2345"
- "332.3"
Non-match examples:
- ".00"
- "23333333333.00" | [
"1.00",
"2345",
"332.3",
"9015.76",
"0876.60",
"30337975.54",
"261814",
"426732.8",
"4",
"5",
"6",
"5438996",
"4856123"
] | [
".00",
"23333333333.00",
"j22.00",
"-123af",
"234/423/5243",
"43.v234",
"56dfsa",
"12f3.21f3.213f",
"324df",
"341.431v4f3.fv1",
"abc111def",
"12/132/90"
] | 332 |
^[AaWaKkNn][a-zA-Z]?[0-9][a-zA-Z]{1,3}$ | Simple match for U.S. Amateur Radio Call signs
Must start with an A,K,N or W.
1 or two prefix letters (not case sensitive),
Exactly one zone digit,
One to three suffix digits( not case sensitive).
73 | Simple match for U.S. Amateur Radio Call signs
Must start with an A,K,N or W.
1 or two prefix letters (not case sensitive),
Exactly one zone digit,
One to three suffix digits( not case sensitive).
Match examples:
- "kd6dun"
- "W9OXZ"
- "kb8ae"
Non-match examples:
- "kdd90bz"
- "de7bgw" | [
"kd6dun",
"W9OXZ",
"kb8ae",
"A0Icp",
"A7BxG",
"Wg4x",
"k9Zqy",
"k2dGw",
"N1jM",
"A0BK",
"N4Rl",
"a2QJ",
"a3zvj"
] | [
"kdd90bz",
"de7bgw",
"WV7BXQ5",
"fads2fe",
"2feef",
"e2ffe",
"f2eafe",
"f2ewds",
"[email protected]",
"354/243/542",
"abc111def",
"12/132/90"
] | 333 |
^(Sun|Mon|(T(ues|hurs))|Fri)(day|\.)?$|Wed(\.|nesday)?$|Sat(\.|urday)?$|T((ue?)|(hu?r?))\.?$ | This RE matches Days of the week or their abbreviations. | This RE matches Days of the week or their abbreviations.
Match examples:
- "Sunday"
- "Mon"
- "Tu"
Non-match examples:
- "day"
- "Wedday" | [
"Sunday",
"Mon",
"Tu",
"Thu",
"Sun",
"Tu.",
"Wed",
"Sat.",
"Sun.",
"Thurs",
"Wednesday",
"Saturday",
"Thursday"
] | [
"day",
"Wedday",
"Payday",
"Mastercard",
"afdfs",
"sundafahds",
"ewnefdesday",
"happyday",
"mothersday",
"childrensday",
"sadday",
"notredameday"
] | 338 |
^\w+.*$ | Validates any line begining with an alpha-numeric. If you need a regular expression that fails only for a zero length string. Remove the \w+. I originally attempted to post was ^.*$ but the input form would not allow it. | matches a wide range of text strings that have at least one word character((letters, digits, or underscores) at the beginning.
Match examples:
- "user name"
- "o)(=-&r443*/"
- "fds2f"
Non-match examples:
- "=stuff"
- ".username" | [
"user name",
"o)(=-&r443*/",
"fds2f",
"23f2ef",
"bh",
"87",
"u8hh98",
"9h",
"99h9",
"8hh9",
"9h8",
"8hg97f",
"76df"
] | [
"=stuff",
".username",
"@!R-243fads",
"#$r1w1-123fads",
"#RFE",
"%FTYV",
"*&YHU",
"*%^TYGVH",
"%^TYF",
"(*IU",
"&^YGU",
"$%ERTYU"
] | 342 |
^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-2]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])\s))([AM|PM|am|pm]{2,2})))?$ | Matches ANSI SQL date format YYYY-mm-dd hh:mi:ss am/pm. You can use / - or space for date delimiters, so 2004-12-31 works just as well as 2004/12/31. Checks leap year from 1901 to 2099. | Matches ANSI SQL date format YYYY-mm-dd hh:mi:ss am/pm. You can use / - or space for date delimiters, so 2004-12-31 works just as well as 2004/12/31. Checks leap year from 1901 to 2099.
Match examples:
- "2004-2-29"
- "2004-02-29 10:29:39 pm"
- "2004/12/31"
Non-match examples:
- "2003-2-29"
- "2003-13-02" | [
"2004-2-29",
"2004-02-29 10:29:39 pm",
"2004/12/31",
"2004-2-29",
"2008-12-07",
"2013-2-28",
"2012-12-29",
"2004-02-29 10:29:39 pm",
"2004-02-28 11:19:39 pm",
"2004-02-26 10:08:39 pm",
"2004/12/19",
"2004/5/31",
"2004/8/31"
] | [
"2003-2-29",
"2003-13-02",
"2003-2-2 10:72:30 am",
"12/123/4322",
"2346-2345-2435",
"43.v234",
"43-5432",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"(0xx12) 62509",
"12/132/90"
] | 343 |
^((AL)|(AK)|(AS)|(AZ)|(AR)|(CA)|(CO)|(CT)|(DE)|(DC)|(FM)|(FL)|(GA)|(GU)|(HI)|(ID)|(IL)|(IN)|(IA)|(KS)|(KY)|(LA)|(ME)|(MH)|(MD)|(MA)|(MI)|(MN)|(MS)|(MO)|(MT)|(NE)|(NV)|(NH)|(NJ)|(NM)|(NY)|(NC)|(ND)|(MP)|(OH)|(OK)|(OR)|(PW)|(PA)|(PR)|(RI)|(SC)|(SD)|(TN)|(TX)|(UT)|(VT)|(VI)|(VA)|(WA)|(WV)|(WI)|(WY))$ | This validates the states and territories of the United States in a 2 character uppercase format. Very poor excuse for a regular expression! ;)
Written by Jason Gaylord. | This validates the states and territories of the United States in a 2 character uppercase format.
Match examples:
- "NY"
- "PA"
- "NJ"
Non-match examples:
- "Pennsylvania"
- "Pa" | [
"NY",
"PA",
"NJ",
"MA",
"KS",
"AL",
"IA",
"VI",
"CT",
"NE",
"ME",
"MT",
"HI"
] | [
"Pennsylvania",
"Pa",
"pa",
"INDIANA",
"QW",
"WER",
"AB",
"XX",
"EE",
"WER",
"SDF",
"DD"
] | 346 |
^([\(]{1}[0-9]{3}[\)]{1}[ ]{1}[0-9]{3}[\-]{1}[0-9]{4})$ | It is the exact phone number regular expression for '(###) ###-####'.
Written by Jason Gaylord. | It is the exact phone number regular expression for '(###) ###-####'.
Match examples:
- "(555) 555-1212"
- "(575) 609-4178"
- "(435) 236-2754"
Non-match examples:
- "555-1212"
- "1-800-555-1212" | [
"(555) 555-1212",
"(575) 609-4178",
"(435) 236-2754",
"(094) 722-0258",
"(743) 805-8464",
"(838) 390-9293",
"(717) 033-3038",
"(834) 145-5776",
"(255) 800-3155",
"(740) 815-8610",
"(621) 005-4039",
"(538) 776-0986",
"(883) 167-0736"
] | [
"555-1212",
"1-800-555-1212",
"555-555-1212",
"12/123/4322",
"2346-2345-2435",
"2/3/5235",
"43-5432",
"415-94561-51",
"9516-9516",
"-5612516-9561",
"8451-95614-956",
"48561-49516-51"
] | 347 |
^(([0]?[1-9]|1[0-2])/([0-2]?[0-9]|3[0-1])/[1-2]\d{3})? ?((([0-1]?\d)|(2[0-3])):[0-5]\d)?(:[0-5]\d)? ?(AM|am|PM|pm)?$ | Matches variations on date/time/AM-PM. Must have 4 digit year, but everything else is open. Restrictions are: 4 digit year, months 1-12, hours 1-23, minutes and seconds 1-59, any case of AM and PM. If this don't woik, I wrote it, lemmy know. | Matches variations on date/time/AM-PM. Must have 4 digit year, but everything else is open. Restrictions are: 4 digit year, months 1-12, hours 1-23, minutes and seconds 1-59, any case of AM and PM.
Match examples:
- "12/30/2002"
- "12/30/2002 9:35 pm"
- "12/30/2002 19:35:02"
Non-match examples:
- "18/22/2003"
- "8/12/99" | [
"12/30/2002",
"12/30/2002 9:35 pm",
"12/30/2002 19:35:02",
"11/31/1847",
"10/31/2051",
"12/8/1094 20:19:36",
"06/31/1101 15:46",
"10/31/1956 4:00",
"10/31/2553",
"04/30/1121 23:03 PM",
"7/30/2673",
"4:03:29PM",
"3:25:25"
] | [
"18/22/2003",
"8/12/99",
"8/22/2003 25:00",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"9/9/9",
"12/132/90"
] | 348 |
^\d(\d)?(\d)?$ | Matches positive whole numbers from 0-999 | Matches positive whole numbers from 0-999
Match examples:
- "0"
- "12"
- "876"
Non-match examples:
- "1000"
- "1.23" | [
"0",
"12",
"876",
"489",
"987",
"162",
"875",
"495",
"86",
"87",
"15",
"39",
"5"
] | [
"1000",
"1.23",
"-234",
"48956",
"4985",
"89448",
"45665187",
"8374",
"515.1",
"45.64",
"45.87",
"65.541"
] | 349 |
^(3[0-1]|2[0-9]|1[0-9]|0[1-9])[\s{1}|\/|-](Jan|JAN|Feb|FEB|Mar|MAR|Apr|APR|May|MAY|Jun|JUN|Jul|JUL|Aug|AUG|Sep|SEP|Oct|OCT|Nov|NOV|Dec|DEC)[\s{1}|\/|-]\d{4}$ | More flexible date validator. Allows either spaces, / or - as dividers, also allows for fully uppercase months, year as 4 digit. | More flexible date validator. Allows either spaces, / or - as dividers, also allows for fully uppercase months, year as 4 digit.
Match examples:
- "01 JAN 2003"
- "31/Dec/2002"
- "20-Apr-2003"
Non-match examples:
- "32 Jan 2003"
- "00 Dec 2003" | [
"01 JAN 2003",
"31/Dec/2002",
"20-Apr-2003",
"31 Jul
1627",
"12 JAN 7565",
"01 JAN 3875",
"21 JAN 5735",
"31/Dec/7868",
"20/Dec/7357",
"18/Dec/3757",
"10-Apr-7837",
"15-Apr-6375",
"27-Apr-6788"
] | [
"32 Jan 2003",
"00 Dec 2003",
"10 dec 2003",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"/5/5/20022",
"JAN 123",
"FEB 324 2020",
"JULY 414 1941",
"DEC 2434"
] | 350 |
^[1-9]{1}[0-9]{3}\s{0,1}?[a-zA-Z]{2}$ | Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters. | Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters.
Match examples:
- "1234AB"
- "1234 AB"
- "1234 ab"
Non-match examples:
- "0123AB"
- "123AA" | [
"1234AB",
"1234 AB",
"1234 ab",
"1546zZ",
"1187wD",
"7615CS",
"8248rO",
"4735jM",
"8618Bo",
"5668eQ",
"8597qG",
"6792Hm",
"1965VU"
] | [
"0123AB",
"123AA",
"3F22FV",
"3F2VF",
"F32V2F",
"32VF2F",
"DEFV2",
"F3V3F3D",
"D3FD",
"DFV3FV",
"3V3FDCV",
"V3FDFVR"
] | 351 |
[\\s+,] | Simple expression for matching all commas and all whitespace characters: ASCII (13,10,44) | Matches any single character that is either a whitespace character (\s), a plus sign (+), or a comma (,). It's a character class that includes these three specific characters.
Match examples:
- ","
- "whitespace"
- "carrage returns"
Non-match examples:
- "cat"
- "jioj" | [
",",
"whitespace",
"carrage returns",
"+",
",",
"+,",
"spafsd",
"safsdf",
"fdsu",
"sfaaaa",
"fsioj",
"fsjoi",
"fsdjii"
] | [
"cat",
"jioj",
"oib",
"noi",
"oi",
"joi",
"noiboib",
"jib",
"no",
"inoi",
"iobiou",
"bui"
] | 353 |
^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\ (0?[1-9]|([12]\d)|30))|(Feb(ruary)?\ (0?[1-9]|1\d|2[0-8]|(29(?=,\ ((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\,\ ((1[6-9]|[2-9]\d)\d{2})) | This RE validate Dates in the MMM dd, yyyy format from Jan 1, 1600 to Dec 31, 9999. The format is as follows: The name or 3 letter abbreivation, without a period, of the month, then a space then the day value then a comma then a space finally the year. The correct number of day are validated for each month include leap years. The name of month is case sensitive. | This RE validate Dates in the MMM dd, yyyy format from Jan 1, 1600 to Dec 31, 9999. The format is as follows: The name or 3 letter abbreivation, without a period, of the month, then a space then the day value then a comma then a space finally the year. The correct number of day are validated for each month include leap years. The name of month is case sensitive.
Match examples:
- "Jan 1, 2003"
- "February 29, 2004"
- "November 02, 3202"
Non-match examples:
- "Feb 29, 2003"
- "Apr 31, 1978" | [
"Jan 1, 2003",
"February 29, 2004",
"November 02, 3202",
"December 31, 1918",
"December 22, 1709",
"Feb 14, 1992",
"March 14, 1670",
"Aug 31, 7564",
"January 31, 1807",
"December 31, 5076",
"April 30, 5035",
"Feb 9, 2801",
"Dec 30, 8045"
] | [
"Feb 29, 2003",
"Apr 31, 1978",
"jan 33,3333",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"/5/5/20022",
"432/524/2435",
"1-1-2",
"(0xx12) 62509",
"12/132/90"
] | 354 |
^((31(?!\ (Feb(ruary)?|Apr(il)?|June?|(Sep(?=\b|t)t?|Nov)(ember)?)))|((30|29)(?!\ Feb(ruary)?))|(29(?=\ Feb(ruary)?\ (((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])\ (Jan(uary)?|Feb(ruary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sep(?=\b|t)t?|Nov|Dec)(ember)?)\ ((1[6-9]|[2-9]\d)\d{2})$ | This RE validates dates in the dd MMM yyyy format. Spaces separate the values. | This RE validates dates in the dd MMM yyyy format. Spaces separate the values.
Match examples:
- "31 January 2003"
- "29 March 2004"
- "29 Feb 2008"
Non-match examples:
- "Jan 1 2003"
- "31 Sept 2003" | [
"31 January 2003",
"29 March 2004",
"29 Feb 2008",
"29 Jul 4950",
"30 July 4945",
"29 Jan 2897",
"20 Aug 1664",
"06 August 1962",
"20 Oct 1786",
"29 Aug 1673",
"31 January 1785",
"31 August 1825",
"13 Dec 1955"
] | [
"Jan 1 2003",
"31 Sept 2003",
"29 February 2003",
"12/12/2222",
"15/15/1655",
"2/3/5235",
"43-5432",
"Jan 43 4139",
"Feb 432 234",
"March 423 295",
"July 942384239",
"Augu 4325"
] | 355 |
^(?:J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept|Nov|Dec)em)|Octo)ber)$ | This RE validate the full name of the months. | This RE validate the full name of the months.
Match examples:
- "January"
- "May"
- "October"
Non-match examples:
- "Jan"
- "Septem" | [
"January",
"May",
"October",
"March",
"February",
"August",
"April",
"June",
"July",
"September",
"November",
"December"
] | [
"Jan",
"Septem",
"Octo",
"Mastercard",
"sfalijad234",
"aug",
"jan",
"dec",
"oct",
"febru",
"apr",
"abc"
] | 356 |
^1+0+$ | A simple regular expression to determine if a subnet mask is contiguous; that is, the submask must start with a 1 bit followed by 0 or more 1 bits, followed by 1 or more 0 bits until the end of the submask. | A simple regular expression to determine if a subnet mask is contiguous; that is, the submask must start with a 1 bit followed by 0 or more 1 bits, followed by 1 or more 0 bits until the end of the submask.
Match examples:
- "10"
- "110"
- "1100"
Non-match examples:
- "0"
- "01" | [
"10",
"110",
"1100",
"1110",
"111000",
"1100000",
"11111000",
"11000000",
"10000",
"11110",
"11111110000",
"110000000000",
"111100000000"
] | [
"0",
"01",
"101",
"10101010",
"01010100",
"010010",
"101",
"010",
"10010101",
"1010101011010011",
"010",
"10101010101"
] | 358 |
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/((1[6-9]|[2-9]\d)\d{2}))|(29\/02\/((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$ | dd/MM/yyyy with leap years 100% integrated
Valid years : from 1600 to 9999
As usual, many tests have been made.
I think this one should be fine. | dd/MM/yyyy with leap years integrated
Valid years : from 1600 to 9999
Match examples:
- "29/02/2000"
- "30/04/2003"
- "01/01/2003"
Non-match examples:
- "29/02/2001"
- "30-04-2003" | [
"29/02/2000",
"30/04/2003",
"01/01/2003",
"02/12/4845",
"21/02/1861",
"30/03/7831",
"20/02/9516",
"06/02/1764",
"09/02/5152",
"30/12/6866",
"03/07/1839",
"03/07/1982",
"08/04/1748"
] | [
"29/02/2001",
"30-04-2003",
"1/1/2003",
"12/123/4322",
"234/423/5243",
"233/3/5235",
"43-5432",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"9/9/9",
"12/132/90"
] | 359 |
^\d{1,5}(\.\d{1,2})?$ | validate a number 5 digits and 2 decimal places allowing zero | Validates numbers with up to five digits, including optional decimal places with one or two decimal digits.
Match examples:
- "12345.67"
- "0"
- "0.1"
Non-match examples:
- "123456.78"
- "123456.789" | [
"12345.67",
"0",
"0.1",
"86476.4",
"66995",
"586.94",
"84832",
"101.42",
"8",
"63.7",
"30.14",
"059",
"1"
] | [
"123456.78",
"123456.789",
".1",
"-123",
"2346-2345-2435",
"9841562.65123",
"561.456123",
"5416561.456123",
".4898979",
"341.431v4f3.fv1",
"9/9/9",
"32542 //"
] | 360 |
(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,2})?$ | validates to 5 digits and 2 decimal places but not allowing zero | this regular expression validates numbers with up to five digits, including optional decimal places with one or two decimal digits, while excluding inputs that consist solely of zeros or zero decimals.
Match examples:
- "12345.12"
- "0.5"
- "7"
Non-match examples:
- "123456.12"
- "1.234" | [
"12345.12",
"0.5",
"7",
"79",
"4362.3",
"86",
"9948.5",
"7.76",
"4658.9",
"4",
"8.6",
"11349",
"516"
] | [
"123456.12",
"1.234",
".1",
"-123",
"234/423/5243",
"43.v234",
"43-5432",
"254627g.256",
"245/524/12",
"1-1-2",
"9/9/9",
"32542.456234"
] | 361 |
^[^<>`~!/@\#}$%:;)(_^{&*=|'+]+$ | A general string validation to insure that NO malicious code or specified characters are passed through user input. This will allow you to input any characters except those specified. The expression above does not allow user input of <>`~!/@\#}$%:;)(_^{&*=|'+. Input as many invalid characters you wish to deny. This really works! | This regular expression checks if a given string contains only characters other than the specified special characters. If any of these special characters are found in the string, it will not be matched. These characters include < > ` ~ ! / @ \ # } $ % : ; ) ( _ ^ { & * = | ' +.
Match examples:
- "This is a test"
- "fdsjkfsd hkshjdf"
- "hjfds hfjsdkh"
Non-match examples:
- "^&GYGH"
- "<br>" | [
"This is a test",
"fdsjkfsd hkshjdf",
"hjfds hfjsdkh",
"huifd879h",
"h98",
"h89",
"h98h",
"98h9h",
"f7g",
"98gf57",
"f8h9",
"h09h98g",
"g98g98g"
] | [
"^&GYGH",
"<br>",
"That's it",
"F^TYVGH",
"9hi\"hfieds'",
"'fdgdf",
"huhiyfgdyi'",
"'gfs$#ERFW",
"gyi'",
"idygiyfd'giyd97r@#E",
"98g'RF$E",
"$#EFg98g98g*&U\"''"
] | 362 |
^([\(]{1}[0-9]{3}[\)]{1}[\.| |\-]{0,1}|^[0-9]{3}[\.|\-| ]?)?[0-9]{3}(\.|\-| )?[0-9]{4}$ | More permissive than others on the site, this one allows you to let a user enter US phone numbers in the way they most commonly use, without letting them enter non-valid combinations. | More permissive than others on the site, this one allows you to let a user enter US phone numbers in the way they most commonly use, without letting them enter non-valid combinations.
Match examples:
- "5551212"
- "614555-1212"
- "(614)555-1212"
Non-match examples:
- "A12-5555"
- "(614-555-1212" | [
"5551212",
"614555-1212",
"(614)555-1212",
"(842)993 0045",
"(283)2708210",
"186198 3473",
"(849)-8231974",
"823-864-6500",
"6881622666",
"929-5392",
"808-1305",
"488787-0909",
"(629)0196963"
] | [
"A12-5555",
"(614-555-1212",
"555*1212",
"12/123/4322",
"2346-2345-2435",
"2/3/5235",
"43-5432",
"/5/5/20022",
"245/524/12",
"(0xx12) 7256 2345154",
"(0xx12) 62509",
"++63453.345"
] | 363 |
^([1-9]{1}[0-9]{3}[,]?)*([1-9]{1}[0-9]{3})$ | Matches a comma-seperated list of year(s). | Matches a comma-seperated list of year(s).
Match examples:
- "1999,2001,1988"
- "1999"
- "4895"
Non-match examples:
- "0199,1997"
- "0199" | [
"1999,2001,1988",
"1999",
"4895",
"1984",
"4896,4856",
"4568",
"9846",
"4895,4985,8946",
"8467",
"7897",
"7835",
"1894,4189,1894,7984",
"4894,8793"
] | [
"0199,1997",
"0199",
"1999,",
"156915,",
"15981,",
"65165,",
"46484354,4894fsd",
"/5/5/20022",
"000-000",
"354/243/542",
"9/9/9",
"12/132/90"
] | 364 |
^(((0[13578]|10|12)([-./])(0[1-9]|[12][0-9]|3[01])([-./])(\d{4}))|((0[469]|11)([-./])([0][1-9]|[12][0-9]|30)([-./])(\d{4}))|((02)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\d{4}))|((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])))$ | This works for all accept 01/01/0000 mainly 0000. can anybody suggest a solution. | Checks for various date formats, valid months and days, leap years, and different separators. It ensures that the input follows a valid date format and is suitable for date validation in different contexts.
The regular expression matches dates in various formats:
MM/DD/YYYY
MM-DD-YYYY
MM.YYYY/DD
YYYY/MM/DD
YYYY-MM-DD
YYYY.MM.DD
It enforces specific rules for each part of the date:
MM (month) can be 01-12.
DD (day) depends on the month and can be 01-31.
YYYY (year) must be a four-digit number.
It considers leap years for February (02) by allowing 29 days in certain cases.
It handles different separators between date components (e.g., '-', '/', '.').
It accounts for various scenarios related to leap years, including divisibility by 4, 100, and 400.
Match examples:
- "01/01/2001"
- "02/29-2800"
- "02/29/2108"
Non-match examples:
- "01/01/00000"
- "52/2/54/245" | [
"01/01/2001",
"02/29-2800",
"02/29/2108",
"11-26/9165",
"02/29-7600",
"02.29/2800",
"02/29-5600",
"02.04.1914",
"02.29/0152",
"12.23.6006",
"11.24-1607",
"11/13-2502",
"10.08.0722"
] | [
"01/01/00000",
"52/2/54/245",
"2534/52435234/2453",
"12/123/4322",
"234/423/5243",
"2/3/5235",
"43-5432",
"/5/5/20022",
"432/524/2435",
"354/243/542",
"9/9/9",
"12/132/90"
] | 366 |
^((\d{5}-\d{4})|(\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\d[A-Za-z]\s?\d[A-Za-z]\d))$ | Regular expression for US (ZIP and ZIP+4) and Canadian postal codes. It allows 5 digits for the first US postal code and requires that the +4, if it exists, is four digits long. Canadain postal codes can contain a space and take form of A1A 1A1. The letters can be upper or lower case, but the first letter must be one of the standard Canadian zones: A,B,C,E,G,H,J,K,L,M,N,P,R,S,T,V,X,Y. | Regular expression for US (ZIP and ZIP+4) and Canadian postal codes. It allows 5 digits for the first US postal code and requires that the +4, if it exists, is four digits long. Canadain postal codes can contain a space and take form of A1A 1A1. The letters can be upper or lower case, but the first letter must be one of the standard Canadian zones: A,B,C,E,G,H,J,K,L,M,N,P,R,S,T,V,X,Y.
Match examples:
- "00501"
- "84118-3423"
- "n3a 3B7"
Non-match examples:
- "501-342"
- "123324" | [
"00501",
"84118-3423",
"n3a 3B7",
"07743-6002",
"80135-5335",
"36898-1873",
"55717-8018",
"04808",
"A8g8o2",
"33144",
"V0k0a4",
"66972",
"87740-7005"
] | [
"501-342",
"123324",
"Q4B 5C5",
"Mastercard",
"234/423/5243",
"43.v234",
"/5/5/5",
"2546dgwre",
"324df",
"adfa2",
"abc111def",
"99999@gmail"
] | 367 |
^[a-zA-Z_]{1}[a-zA-Z0-9_]+$ | This expression validates for valid C# or C++ identifier | This expression validates for valid C# or C++ identifier
Match examples:
- "_12ffsd"
- "abcd123"
- "abcd_23232"
Non-match examples:
- "..//"
- "..13e232" | [
"_12ffsd",
"abcd123",
"abcd_23232",
"asdfa12",
"fty67",
"gy78g",
"gy76g",
"gyg7g78g",
"g78guy",
"_giuy24",
"_sfdih238",
"gy789fsu",
"yugfsd78"
] | [
"..//",
"..13e232",
"abcd 3232",
"8f7sdh h89fdsh",
"hfusdh98shdf98h fhsu",
"h h89fh",
"huh8uh98h h89h09ju",
"90u09u09",
"90ut67f",
"76g67",
"(0xx12) 62509",
"0j0jweBBBB"
] | 369 |
^[1]$|^[3]$|^[4]$|^[6]$|^[1]0$ | This will match single numbers,the first block [1346] checks for single digits of 1, 3, 4 or 6, could easily by [1-5] as well. The second block [10] checks for 10 only.
This matches inclusively. | This will match single number, the first block [1346] checks for single digits of 1, 3, 4 or 6, could easily by [1-5] as well. The second block [10] checks for 10 only. This matches inclusively.
Match examples:
- "1"
- "4"
- "10"
Non-match examples:
- "13"
- "2" | [
"1",
"4",
"10",
"3",
"6"
] | [
"13",
"2",
"0",
"5",
"7",
"8",
"9",
"8495",
"485684",
"4856",
"4234",
"56465"
] | 370 |
^[A]$|^[C]$|^[D]$|^[F]$|^[H]$|^[K]$|^[L]$|^[M]$|^[O]$|^[P]$ | This is for matching Single uppercase Letters inclusively | matches a single uppercase letter from the set {A, C, D, F, H, K, L, M, O, P}.
Match examples:
- "A"
- "F"
- "P"
Non-match examples:
- "a"
- "b" | [
"A",
"F",
"P",
"H",
"M",
"C",
"O",
"L",
"D",
"K"
] | [
"a",
"b",
"cd",
"fadsf",
"afd",
"f",
"d",
"g",
"B",
"Z",
"Y",
"X"
] | 371 |
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$ | 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. It is based on a currency regular expression by Tom Persing. | This regex pattern is designed to match a numeric value that can be either a positive integer, a positive decimal number, zero, or a positive decimal number less than 1 with up to two decimal places. It allows for an optional minus sign at the beginning to indicate negative numbers.
Match examples:
- "123"
- "123.54"
- "-.54"
Non-match examples:
- "123.543"
- "0012" | [
"123",
"123.54",
"-.54",
"49",
"489",
"9",
"8",
"7",
"64",
"54",
"45.15",
"48.97",
"98.51"
] | [
"123.543",
"0012",
"1,000.12",
"-123.423",
"51:534",
"$23.454",
"56.153153",
"254627g.256",
"432/524/2435",
"1-1-2",
"(0xx12) 62509",
"12/132/90"
] | 374 |
<[^>]*> | HTML Pattern Matching
PLEASE HELP
/<[^>]*>/ig
The above pattern is only successful when html tag are simple (they don't include any javascript). This mean that the pattern will fail if something like this is within the tag <input type=button value=test onclick='if(n.value>5)do_this();'>. It will not match the entire open n close sign.
How do you write a pattern that will pass all these tag so that the pattern will match from the open to the close sign and not when it just see a > within a '' or "".
<input type=button onclick='if(n.value>5)do_this();'> not this <br>
<input type=button onclick="n>5?a():b();" value=test> not this <br>
<input type=button onclick="n>5?a(\"OK\"):b('Not Ok');" value=test> not this <br>
<input type=button onclick='n>5' value=test onmouseover="n<5&&n>8" onmouseout='if(n>5)alert(\'True\');else alert("False")'> not this <br>
Any help would be greatly appreciate. Thanks a whole lot.
Logan | This regex pattern matches HTML/XML tags by looking for text enclosed in angle brackets (< and >), allowing for any characters ([^>]*) between them.
Match examples:
- "<html>"
- "<div>"
- "<a href="https://www.example.com">"
Non-match examples:
- "abc"
- "2fed2" | [
"<html>",
"<div>",
"<a href=\"https://www.example.com\">",
"<p class=\"paragraph\">",
"<>",
"<img src=\"image.jpg\" alt=\"Example Image\">",
"<h1>Title</h1>",
"<span style=\"color: red;\">",
"<br />",
"<ul><li>Item 1</li><li>Item 2</li></ul>",
"<!-- This is a comment -->",
"<input type=\"text\" name=\"username\">",
"<table><tr><td>Data 1</td><td>Data 2</td></tr></table>"
] | [
"abc",
"2fed2",
"df22",
"f2eg",
"g8yu<gu",
"9hu09jiOKIOK",
"9JIMO<",
"H*(UIJMKO<",
"(*IKO<MNH",
"(IOK<HJM",
"<MHJK",
"K<HJM"
] | 381 |
^([0-9]*\-?\ ?\/?[0-9]*)$ | Match italian telephone number with prefix followed by "/", "-" or blank and number. Usefull with numeric keybord! | Match italian telephone number with prefix followed by "/", "-" or blank and number.
Match examples:
- "02-343536"
- "02/343536"
- "02 343536"
Non-match examples:
- "02a343536"
- "02+343536" | [
"02-343536",
"02/343536",
"02 343536",
"123",
"456-4545",
"49516-49516",
"4561-489",
"49856/4895",
"485/485",
"485951",
"485",
"7845",
"673"
] | [
"02a343536",
"02+343536",
"&*YHIUJN",
"U()IHU",
"UYGHJY*(U",
"GYUH",
"*UIHT*&Y876849",
"y89uhiy89uhi*&UI",
"y*(UHIyuhi",
"98yUHIiuf",
"hiufs89y",
"fs+5644f"
] | 382 |
^(\d+|[a-zA-Z]+)$ | Tests for all numbers OR all letters (upper or lower case)
( posted from WebService - http://regexlib.com/webservices.asmx?op=Save )
( updated from WebService - http://regexlib.com/webservices.asmx?op=Save ) | Tests for all numbers OR all letters (upper or lower case)
Match examples:
- "aaaaadddaaaaa"
- "1166633337"
- "48956"
Non-match examples:
- "1n"
- "ppppp99" | [
"aaaaadddaaaaa",
"1166633337",
"48956",
"485",
"4687",
"3573",
"5",
"guy",
"huih",
"u",
"fiuf",
"iyf",
"yift"
] | [
"1n",
"ppppp99",
"yuih423",
"y78ui",
"t78gfy",
"ryfut312",
"dyff8gy89yuhh9",
"ug8u",
"78yg8y",
"8yg76d667dd6",
"768afds",
"8787fy"
] | 386 |
\.com/(\d+)$ | This is a regex I wrote to capture requests to AspAlliance.com with an article id as the only thing after the domain. So http://aspalliance.com/123 would go to article number 123. It maps the URL to the actual aspx file that displays the article based on the ID. | This regex pattern matches URLs that end with ".com/" followed by one or more digits. It captures the digits at the end of the URL.
Match examples:
- "http://aspalliance.com/123"
- "www.aspalliance.com/123"
- "http://aspalliance.com/34"
Non-match examples:
- "http://aspalliance.com/article.aspx?id=123"
- "http://aspalliance.com/" | [
"http://aspalliance.com/123",
"www.aspalliance.com/123",
"http://aspalliance.com/34",
"https://www.example.com/123",
"http://example.com/456",
"https://www.test.com/789",
"http://subdomain.example.com/42",
"https://example.com/0",
"https://www.example.com/12345",
"http://sub.example.com/9999",
"https://example.com/987654",
"https://www.example.com/1",
"http://sub.example.com/333"
] | [
"http://aspalliance.com/article.aspx?id=123",
"http://aspalliance.com/",
"http://aspalliance.com/articl",
"12/123/4322",
"sfalijad234",
"2/3/5235",
"@#dfkjnav",
"12f3.21f3.213f",
"[email protected]",
"com.edu.github",
"(0xx12) 62509",
"++63453.345"
] | 392 |
^[0-9]{5}([- /]?[0-9]{4})?$ | US Zip Code + 4 digit extension Postal Code | US Zip Code + 4 digit extension Postal Code
Match examples:
- "14467"
- "144679554"
- "14467-9554"
Non-match examples:
- "14467 955"
- "14467-" | [
"14467",
"144679554",
"14467-9554",
"98530/6404",
"928248626",
"01520",
"53972",
"61907",
"45857-2888",
"39269",
"39269",
"17547-4481",
"78123"
] | [
"14467 955",
"14467-",
"1446-9554",
"12/123/4322",
"2346-2345-2435",
"43.v234",
"43-5432",
"/5/5/20022",
"432/524/2435",
"1-1-2",
"(0xx12) 62509",
"12/132/90"
] | 395 |
<([^<>\s]*)(\s[^<>]*)?> | All tags in first submatche
All attributes in second one... | Match HTML-like tags in a text, including both opening and closing tags.
Match examples:
- "<td class="TD2">"
- "<!-- comment -->"
- "</table>"
Non-match examples:
- "19-Fev-2002 - 19h00"
- "New Changes :" | [
"<td class=\"TD2\">",
"<!-- comment -->",
"</table>",
"<div>",
"<a href=\"https://example.com\">",
"<p class=\"paragraph\">",
"<img src=\"image.jpg\" alt=\"Image\">",
"<h1 id=\"header\">",
"<ul>",
"<li>",
"<span style=\"color:red;\">",
"<table cellpadding=\"5\" cellspacing=\"0\">",
"<input type=\"text\" name=\"username\" value=\"John\">"
] | [
"19-Fev-2002 - 19h00",
"New Changes :",
"...",
"(12) 324 653210",
"123.456.789",
"there is a boy",
"-312",
"2546dgwre",
"u09nKLJG FSL",
"(0xx12) 7256 2345154",
"(0xx12) 62509",
"99999@gmail"
] | 401 |
^((Bob)|(John)|(Mary)).*$(?<!White) | "Starts with but does not end with."
I needed a pattern to require certain first (and optional middle) names, but to fail for certain last names. So if Bob, John, and Mary are acceptable first names but the White's are always rejected then... | Match strings that start with the names "Bob," "John," or "Mary" and do not end with "White."
Match examples:
- "Bob Jones"
- "John Smith"
- "Mary Jane Smith"
Non-match examples:
- "Bob White"
- "Mary Doe White" | [
"Bob Jones",
"John Smith",
"Mary Jane Smith",
"Bob Sdsfui",
"Mary Ufsdui",
"John Jfdsj",
"Bob Ufsduni",
"John Bufisd",
"Mary Ofuidn",
"John Hfsnjii",
"Mary Jfsd",
"Mary Bob",
"John Jfsdfds"
] | [
"Bob White",
"Mary Doe White",
"Gina Smith",
"afdsaf.adijs",
"234",
"2/3/5235",
"@#dfkjnav",
"2546dgwre",
"Jfsu White",
"dsofioi fsifud",
"Bob sdfjio White",
"SDFisojsfdsd"
] | 402 |
^(?-i:A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$ | The RE match U.S. state abbreviation used by the U.S. Post Office. | The RE match U.S. state abbreviation used by the U.S. Post Office.
Match examples:
- "AL"
- "CA"
- "AA"
Non-match examples:
- "New York"
- "California" | [
"AL",
"CA",
"AA",
"AL",
"AK",
"AZ",
"DE",
"FL",
"GA",
"HI",
"ID",
"IL",
"IN"
] | [
"New York",
"California",
"ny",
"fj",
"if",
"ud",
"indiana",
"notre dame",
"minnesota",
"ladf",
"hu",
"fy"
] | 405 |
^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$ | This pattern match italian fiscal code (codice fiscale). | This pattern match italian fiscal code.
Match examples:
- "SPGGRG73A02E625S"
- "czzdll74h18f205w"
- "RpiOQG61R03w469G"
Non-match examples:
- "SP6FFFF3A02E625S"
- "czzdll74h18f205" | [
"SPGGRG73A02E625S",
"czzdll74h18f205w",
"RpiOQG61R03w469G",
"OLyzHw51K18Z629B",
"zAimYP13D38h855H",
"GRQzXT69Y28M275w",
"PTglEY55H26T674Y",
"eBEuhS45v47o338b",
"jliwVR50Q99l187p",
"IUhXMM96N71T672J",
"hoCMai78v86Q840l",
"XomkYf89U53z386d",
"qworms03P35u422p"
] | [
"SP6FFFF3A02E625S",
"czzdll74h18f205",
"f23wed",
"f23edwf2",
"df2sf2e",
"f2d2sgh",
"/5/5/5",
"notre dame",
"u09nKLJG FSL",
"341.431v4f3.fv1",
"(0xx12) 62509",
"99999@gmail"
] | 407 |
^(([8]))$|^((([0-7]))$|^((([0-7])).?((25)|(50)|(5)|(75)|(0)|(00))))$ | Time off hours edit for quarter hour(s) less than eight. | Time off hours edit for quarter hour(s) less than eight.
Match examples:
- "0.25"
- "7.75"
- "8"
Non-match examples:
- "8.25"
- "7.15" | [
"0.25",
"7.75",
"8",
"7",
"575",
"2900",
"8",
"450",
"150",
"100",
"300",
"725",
"625"
] | [
"8.25",
"7.15",
"0.15",
"(12) 324 653210",
"123.456.789",
"2/3/5235",
"56",
"9781.198",
"9516-9516",
"354/243/542",
"9/9/9",
"3409fjg43"
] | 412 |
^(((0[1-9]|[12]\d|3[01])\/(0[13578]|1[02])\/(\d{2}))|((0[1-9]|[12]\d|30)\/(0[13456789]|1[012])\/(\d{2}))|((0[1-9]|1\d|2[0-8])\/02\/(\d{2}))|(29\/02\/((0[48]|[2468][048]|[13579][26])|(00))))$ | Matching : dd/MM/yy
Leap years compatible
Italian style, just for more fun.
Please, don't forget to rate it if you use it. THX | Matching : dd/MM/yy
Leap years compatible
Match examples:
- "31/12/75"
- "29/02/00"
- "29/02/04"
Non-match examples:
- "01/13/01"
- "29/02/01" | [
"31/12/75",
"29/02/00",
"29/02/04",
"24/02/97",
"29/02/08",
"30/11/48",
"20/10/34",
"05/02/94",
"06/02/67",
"04/02/77",
"29/02/00",
"22/02/25",
"20/05/31"
] | [
"01/13/01",
"29/02/01",
"29/02/2004",
"(12) 324 653210",
"234/423/5243",
"2/3/5235",
"/5/5/5",
"12f3.21f3.213f",
"245/524/12",
"354/243/542",
"9/9/9",
"99999@gmail"
] | 421 |
^(0)$|^([1-9][0-9]*)$ | This regular expression matches on postive whole numbers and 0. Whole numbers that are left padded with 0's are not a match. | This regular expression matches on postive whole numbers and 0. Whole numbers that are left padded with 0's are not a match.
Match examples:
- "12"
- "0"
- "1200"
Non-match examples:
- "-12"
- "0012" | [
"12",
"0",
"1200",
"5678",
"587",
"656",
"475",
"35",
"346746",
"486",
"46",
"35357",
"2357"
] | [
"-12",
"0012",
"03425",
"05240",
"00245",
"00025",
"-24",
"-52-",
"-54353-",
"5-325-23",
"9(*HIU",
"(HIO"
] | 429 |
^(0*100{1,1}\.?((?<=\.)0*)?%?$)|(^0*\d{0,2}\.?((?<=\.)\d*)?%?)$ | Percentage (From 0 to 100) | Percentage (From 0 to 100)
Match examples:
- "100%"
- "100"
- "52.65%"
Non-match examples:
- "-1"
- "-1%" | [
"100%",
"100",
"52.65%",
"48%",
"79%",
"67.8%",
"83.7",
"42",
"98",
"52",
"59",
"38.48",
"38.483"
] | [
"-1",
"-1%",
"100.1%",
"4234",
"677",
"45269",
"568",
"989",
"69868",
"423.423.7",
"34.31%%",
"32542 //"
] | 431 |
((^(10|12|0?[13578])(3[01]|[12][0-9]|0?[1-9])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])(30|[12][0-9]|0?[1-9])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)(2[0-8]|1[0-9]|0?[1-9])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)(29)([2468][048]00)$)|(^(0?2)(29)([3579][26]00)$)|(^(0?2)(29)([1][89][0][48])$)|(^(0?2)(29)([2-9][0-9][0][48])$)|(^(0?2)(29)([1][89][2468][048])$)|(^(0?2)(29)([2-9][0-9][2468][048])$)|(^(0?2)(29)([1][89][13579][26])$)|(^(0?2)(29)([2-9][0-9][13579][26])$)) | Matches on MMDDYYYY only, requires all 8 digits | Matches on MMDDYYYY only, requires all 8 digits
Match examples:
- "01012003"
- "02292000"
- "02297352"
Non-match examples:
- "01/01/2003"
- "52/2/54/245" | [
"01012003",
"02292000",
"02297352",
"02299364",
"2299200",
"02299876",
"11301980",
"2181846",
"2297260",
"2291976",
"04021848",
"2299600",
"02291864"
] | [
"01/01/2003",
"52/2/54/245",
"90438502+9503",
"(12) 324 653210",
"123.456.789",
"2/3/5235",
"43-5432",
"254627g.256",
"9516-9516",
"354/243/542",
"9/9/9",
"99999@gmail"
] | 433 |
^\d{1,7}$ | Positive Whole number matched from 0 to 9999999. Only 7 digits length is allowed. | Positive Whole number matched from 0 to 9999999. Only 7 digits length is allowed.
Match examples:
- "1234567"
- "9999999"
- "1"
Non-match examples:
- "12345678"
- "9999.99" | [
"1234567",
"9999999",
"1",
"879",
"9786",
"579598",
"5975",
"75968",
"89756",
"859745",
"7859",
"45793",
"67446"
] | [
"12345678",
"9999.99",
"-1234",
"4567895657",
"5760785680476884",
"47864087453586",
"356845608968",
"785679477649",
"000-000",
"897-",
"(0xx12) 62509",
"3409fjg43"
] | 435 |
^[a-zA-Z0-9_\s-]+$ | This tests an input string for only a-z and A-Z and only allows underscores, hyphens and spaces. The purpose is to force users to generate legitimate, readable file names that can be streamed from the web. | This tests an input string for only a-z and A-Z and only allows underscores, hyphens and spaces. The purpose is to force users to generate legitimate, readable file names that can be streamed from the web.
Match examples:
- "123Testing"
- "123_Testing"
- "123-Testing This"
Non-match examples:
- "!@#Testing"
- "Testing "This"" | [
"123Testing",
"123_Testing",
"123-Testing This",
"67fg",
"76f76",
"f67f87",
"f78f",
"8d",
"67d56tf8f",
"6d7d8_",
"7yf6f8f-f",
"68f8f87f7",
"87f78f78"
] | [
"!@#Testing",
"Testing "This"",
"Don't Forget to Write",
";fdsaafa;",
";f",
";f;'f",
";f'",
";f'dsfsd;'sd",
";ffd;'sf",
"%^FYTFF^",
"$%DRTF(I",
"%^RTYIO"
] | 440 |
^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\,*\s\s*\d{4}$|^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\,*\s\d{4}$|^(January|February|March|April|May|June|July|August|September|October|November|December)\,*\s\d{4}$|^(january|february|march|april|may|june|july|august|september|october|november|december)\,*\s\d{4}$ | Best Use validation to accept a valid "MonthName(,) Year".
It can validate an entry with or without comma (,). | Best Use validation to accept a valid "MonthName(,) Year".
It can validate an entry with or without comma (,).
Match examples:
- "January 2004"
- "Jan, 2004"
- "january 2003"
Non-match examples:
- "Janu 2004"
- "jAn, 2004" | [
"January 2004",
"Jan, 2004",
"january 2003",
"Jan, 2023",
"February, 2022",
"mar, 2021",
"April, 2020",
"May, 2019",
"Jun, 2018",
"July, 2017",
"August, 2016",
"September, 2015",
"October, 2014"
] | [
"Janu 2004",
"jAn, 2004",
"January,2003",
"2023 Jan",
"Dec 2021afd",
"07 July 2017",
"March/2030",
"notre dame",
"9516-9516",
"354/243/542",
"9/9/9",
"99999@gmail"
] | 444 |
^[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)*$ | This allows you to validate first names and last names in seperate fields. Instead of validating a full name in one field. | This allows you to validate first names and last names in seperate fields. Instead of validating a full name in one field.
Match examples:
- "Sameul"
- "O'Conner"
- "Mary-Kate"
Non-match examples:
- "David Bugel"
- "Robert1" | [
"Sameul",
"O'Conner",
"Mary-Kate",
"Hello",
"World",
"Messi",
"Ronaldo",
"Abc",
"Xavi",
"Neymar",
"Santos",
"Jdsfa",
"Phd"
] | [
"David Bugel",
"Robert1",
"Robert M. Larry",
"87h87h8",
"g87g87v8",
"vf7878vf97",
"f79",
"9",
"f89f",
"89gf89",
"gf8f",
"98f7r97t9ut"
] | 452 |
^#?(([fFcC0369])\2){3}$ | Matches the 216 web colors with or without the '#' sign. | Matches the 216 web colors with or without the '#' sign.
Match examples:
- "#FFFFFF"
- "FFCC00"
- "003300"
Non-match examples:
- "#FFFFF"
- "EFCC00" | [
"#FFFFFF",
"FFCC00",
"003300",
"000066",
"#FF0066",
"#9966cc",
"#ff0033",
"CC66ff",
"#336666",
"3366cc",
"#333399",
"ccff99",
"CC99cc"
] | [
"#FFFFF",
"EFCC00",
"030303",
"[email protected]@",
"123.456.789",
"3nf@",
"43-5432",
"2546dgwre",
"9516-9516",
"354/243/542",
"9/9/9",
"99999@gmail"
] | 458 |
^([0-9]{2})(00[1-9]|0[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-6])$ | Matches a Julian date in the format YYDDD. Two digit year followed by a number from 1 - 366 indicating the day of the year. | Matches a Julian date in the format YYDDD. Two digit year followed by a number from 1 - 366 indicating the day of the year.
Match examples:
- "99366"
- "00001"
- "04225"
Non-match examples:
- "74000"
- "04367" | [
"99366",
"00001",
"04225",
"34106",
"26356",
"67099",
"24033",
"79271",
"46242",
"17004",
"22161",
"58096",
"36256"
] | [
"74000",
"04367",
"87yf2",
"877v78",
"f8yf",
"79f798",
"f87f",
"86",
"d78",
"fd78",
"7897",
"c979c7"
] | 464 |
^(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -]?)(?!00)\d\d\3(?!0000)\d{4}$ | This regex validates U.S. social security numbers, within the range of numbers that have been currently allocated. | This regex validates U.S. social security numbers, within the range of numbers that have been currently allocated.
Match examples:
- "078-05-1120"
- "078 05 1120"
- "078051120"
Non-match examples:
- "987-65-4320"
- "000-00-0000" | [
"078-05-1120",
"078 05 1120",
"078051120",
"771168215",
"771-15-6202",
"492555496",
"770 88 6604",
"771740961",
"771-66-1754",
"713130612",
"287435836",
"772131903",
"772 55 5976"
] | [
"987-65-4320",
"000-00-0000",
"(555) 555-5555",
"(12) 324 653210",
"234",
"2/3/5235",
"43-5432",
"254627g.256",
"9516-9516",
"341.431v4f3.fv1",
"34.31",
"32542 //"
] | 465 |
^\d+(?:\.\d{0,2})?$ | Matches positive whole numbers with exactly zero or two decimal points if a . is present. Useful for checking currency amounts, such 5 or 5.00 or 5.25. | Matches positive whole numbers with exactly zero or two decimal points if a . is present. Useful for checking currency amounts, such 5 or 5.00 or 5.25.
Match examples:
- "1"
- "1.23"
- "1234.45"
Non-match examples:
- "a1.34"
- "1.23a" | [
"1",
"1.23",
"1234.45",
"867",
"8657",
"785",
"468.24",
"9678",
"487",
"467.24",
"896",
"579",
"4792"
] | [
"a1.34",
"1.23a",
"a",
"dsfds87",
"f87yf",
"78f79",
"f97f9",
"234.23423",
"423.35223.2",
"4234.234234",
"u9g8vg89",
"v98v"
] | 473 |
[^A-Za-z0-9] | To detect non-alphanumeric characters (for new username/password validation, for instance):
monkey(AT)greyledge.net
14-Oct-2003 11:26 | To detect non-alphanumeric characters (for new username/password validation)
Match examples:
- "!@#$"
- "%^&*"
- "'><?.,""
Non-match examples:
- "ABC123abc"
- "abc123ABC" | [
"!@#$",
"%^&*",
"'><?.,"",
"#&*G@",
"6%FT",
"g*&UI*(",
"(*G:89g",
"9g8G*('",
";(:*(",
"g(:G*((&G",
"g9FG*(::(*&F",
"F(F&:(&FG",
"f(&F*((*:::"
] | [
"ABC123abc",
"abc123ABC",
"abc0132ABC",
"78f78f78",
"f87fv867",
"g67f5",
"4d",
"56f6g98h098",
"h9",
"8h",
"h",
"98gu9"
] | 478 |
^((31(?! (FEB|APR|JUN|SEP|NOV)))|((30|29)(?! FEB))|(29(?= FEB (((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]) (JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC) ((1[6-9]|[2-9]\d)\d{2})$ | Validates date format by DD MMM YYYY. Validates days for each month also.
Ensures that month is uppercase. | Validates date format by DD MMM YYYY. Validates days for each month also.
Ensures that month is uppercase.
Match examples:
- "09 MAY 1981"
- "28 JAN 2004"
- "8 JUL 2006"
Non-match examples:
- "29 FEB 2003"
- "28 Oct 2000" | [
"09 MAY 1981",
"28 JAN 2004",
"8 JUL 2006",
"29 JUN 1645",
"31 JUL 1621",
"30 MAR 3705",
"31 MAR 1720",
"30 DEC 1720",
"10 APR 1811",
"9 JUN 1664",
"29 JUL 1783",
"26 OCT 9125",
"12 JUN 1739"
] | [
"29 FEB 2003",
"28 Oct 2000",
"9 APR 03",
"(12) 324 653210",
"234/423/5243",
"Jan 1234",
"JISFD 3123",
"Feb 292929",
"July 92043",
"August 12003",
"September 13.",
"afds8923idfs"
] | 490 |
^(\d|,)*\d*$ | matches 0 and all positive integers only. will accept comma formatting only. | matches 0 and all positive integers only. will accept comma formatting only.
Match examples:
- "1234"
- "1,234"
- "1,234,567"
Non-match examples:
- "1234.0"
- "-1234" | [
"1234",
"1,234",
"1,234,567",
"9843287",
"98689767",
"587",
"875",
"78578",
"978",
"9780",
"67854",
"57457",
"769"
] | [
"1234.0",
"-1234",
"$1234",
"234.24.23.4.2",
"4.23.2423",
"-3298h498",
"+)h923gd93",
"98g9u",
"234..24324",
",,,243,2.34.234.24.423",
"324.2f32.23",
"d32,32..23d"
] | 492 |
.\{\d\} | String formater matching. | String formater matching.
Match examples:
- "The quick {0} fox {1} over the lazy dog."
- "r{6}"
- "k{0}"
Non-match examples:
- "The {b} is wrong"
- "52/2/54/245" | [
"The quick {0} fox {1} over the lazy dog.",
"r{6}",
"k{0}",
"8{2}",
"J{4}",
"={4}",
"K{4}",
"`{7}",
"|{4}",
"E{9}",
"&{1}",
"5{8}",
"b{5}"
] | [
"The {b} is wrong",
"52/2/54/245",
"90438502+9503",
"(12) 324 653210",
"123.456.789",
"2/3/5235",
"-312",
"1.1",
"245/524/12",
"com.edu.github",
"(0xx12) 62509",
"32542 //"
] | 495 |
^([0-9]*\,?[0-9]+|[0-9]+\,?[0-9]*)?$ | Integer numbers with decimals. Only positives match. This expression doesn't match numbers with group separators | Integer numbers with decimals. Only positives match. This expression doesn't match numbers with group separators
Match examples:
- "1234,50"
- "0,70"
- ",03"
Non-match examples:
- "1.234,50"
- "-234,50" | [
"1234,50",
"0,70",
",03",
"795795",
"4674",
"764",
"64",
"7863",
"8638",
"68",
"3768437",
"84",
"68"
] | [
"1.234,50",
"-234,50",
"-3213",
"-341",
"-423.423",
"-423.5432",
"-23.423.4.234.",
"423.312-1.41-31.2",
"245/524/12",
"897-",
"34.31bb",
"3409fjg43"
] | 496 |
^(((\d{1,3})(,\d{3})*)|(\d+))(.\d+)?$ | validates numbers, with or without decimal places, and comma 1000 separators. | validates numbers, with or without decimal places, and comma 1000 separators.
Match examples:
- "9999999"
- "99999.99999"
- "99,999,999.9999"
Non-match examples:
- "9999."
- "9,99,99999.999" | [
"9999999",
"99999.99999",
"99,999,999.9999",
"757",
"5765967",
"576",
"486.52432",
"54654",
"55679578.23442",
"764",
"6748",
"789578.234",
"423.4234"
] | [
"9999.",
"9,99,99999.999",
"999.9999.9999",
"25342.43.23.f",
"c32",
".d2d",
"e",
"2ed.d2e",
"c2dc.",
"2c3.334`",
".4324.234.23",
"432.423.423.423,234234"
] | 498 |
((([0][1-9]|[12][\d])|[3][01])[-/]([0][13578]|[1][02])[-/][1-9]\d\d\d)|((([0][1-9]|[12][\d])|[3][0])[-/]([0][13456789]|[1][012])[-/][1-9]\d\d\d)|(([0][1-9]|[12][\d])[-/][0][2][-/][1-9]\d([02468][048]|[13579][26]))|(([0][1-9]|[12][0-8])[-/][0][2][-/][1-9]\d\d\d) | Date validation in the dd/mm/yyyy format for years 1000+ (i.e 999 or 0999 not matching) and taking february leap years into account. | Date validation in the dd/mm/yyyy format for years 1000+ (i.e 999 or 0999 not matching) and taking february leap years into account.
Match examples:
- "12/12/2003"
- "29-02-2004"
- "31-03-1980"
Non-match examples:
- "29/02/2003"
- "31-04-2002" | [
"12/12/2003",
"29-02-2004",
"31-03-1980",
"03/02-9939",
"30/11/4290",
"16/02/2270",
"19-12/2585",
"02/08-8347",
"26-02/6604",
"15/02/6288",
"06-02/2800",
"29-07-3911",
"17/02/1620"
] | [
"29/02/2003",
"31-04-2002",
"10-10-0999",
"(12) 324 653210",
"234/423/5243",
"2/331/5235",
"43-5432",
"254627g.256",
"245/524/12",
"354/243/542",
"34.31",
"32542 //"
] | 500 |
(^\$(\d{1,3},?(\d{3},?)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{2})?)$|^\d{1,2}(\.\d{1,2})? *%$|^100%$) | Matches either an explicitly input percentage or dollar amount, variety of formats of currency borrowed from another example on this board. This is useful when you want to prompt the user to specify either dollars or percent using only one field, and want to validate the entered text is one or the other. | Matches either an explicitly input percentage or dollar amount, variety of formats of currency borrowed from another example on this board. This is useful when you want to prompt the user to specify either dollars or percent using only one field, and want to validate the entered text is one or the other.
Match examples:
- "$1000.00"
- "100%"
- "50%"
Non-match examples:
- "%100"
- ".5%" | [
"$1000.00",
"100%",
"50%",
"78%",
"95%",
"95%",
"5%",
"6%",
"7%",
"$78.00",
"$97.00",
"$78.48",
"$78.65"
] | [
"%100",
".5%",
"100",
"-123",
"2346-2345-2435",
"123",
"/5/5/5",
"/5/5/20022",
"000-000",
"897-",
"59",
"985"
] | 501 |
^[A-Z].*$ | Test string to verify it begins with an upper-case letter. | Test string to verify it begins with an upper-case letter.
Match examples:
- "Lewis"
- "Edward"
- "Moten"
Non-match examples:
- "lewis"
- "1moten" | [
"Lewis",
"Edward",
"Moten",
"Jfhsduihi",
"Gfhdsih",
"Yhfsdioj",
"Ufsdj",
"Ifsjdi",
"Fdisofj",
"Diuhds",
"Yfsdoh",
"Thfudsi",
"Lfuids"
] | [
"lewis",
"1moten",
"@home",
"hsdfui89h",
"uihufdsHFUSDI",
"hJfusdfh",
"hhfsdf89Hfudsh89",
"h9uf8sh98h32",
"9y8uh9uhHUFISD",
"89yFIHUDS",
"9guhisdfYFGD",
"239472-3489"
] | 507 |
(^N/A$)|(^[-]?(\d+)(\.\d{0,3})?$)|(^[-]?(\d{1,3},(\d{3},)*\d{3}(\.\d{1,3})?|\d{1,3}(\.\d{1,3})?)$) | This pattern matches a decimal value with up to 3 digits after the decimal. Comma is allowed as a thousands separator but not required. N/A is also allowed. | This pattern matches a decimal value with up to 3 digits after the decimal. Comma is allowed as a thousands separator but not required. N/A is also allowed.
Match examples:
- "405.234"
- "50"
- "213123.456"
Non-match examples:
- "bathreader"
- "this is N/A" | [
"405.234",
"50",
"213123.456",
"-1",
"N/A",
"48",
"8794",
"789",
"789",
"846.4",
"843.49",
"489.487",
"789"
] | [
"bathreader",
"this is N/A",
"3.14159",
"+10",
"978.89456",
"894.89456",
"7.8956",
"8.8495623",
"87yhuijn",
"8uhijn",
"78.897894",
"*&HUSIDN"
] | 512 |
^([1-9]{1}[0-9]{0,7})+((,[1-9]{1}[0-9]{0,7}){0,1})+$ | Validate a comma delimited string of integer between 1 and 99999999 (change {0,7} to whatever you need). No zero leading. | Validate a comma delimited string of integer between 1 and 99999999. No zero leading.
Match examples:
- "1,2,3455,12345678"
- "23045,34678,2892"
- "1,2,99999999"
Non-match examples:
- "01,234,567"
- "123,0445,3434," | [
"1,2,3455,12345678",
"23045,34678,2892",
"1,2,99999999",
"48489",
"4984",
"684687",
"87",
"864885",
"848643",
"878",
"5",
"87638465",
"65"
] | [
"01,234,567",
"123,0445,3434,",
"121,,1212,,12,",
"651afds",
"8guibj",
"guib",
"gui9ghoi",
"3rreddc",
"4561,56,,,4,8,456,",
",f,d,",
"(0xx12) 62509",
"++63453.345"
] | 519 |
^[a-zA-Z0-9\s]+$ | Alphanumeric expression with spaces | Alphanumeric expression with spaces
Match examples:
- "123asd"
- "111 ee11e"
- "223 eeddd23"
Non-match examples:
- "12' ggg"
- "<>dfdg 444" | [
"123asd",
"111 ee11e",
"223 eeddd23",
"fads fahdsu",
"gh87fghs",
"h87 sdfh8 sdfh",
"h98f7s h98sdf h",
"9 hf89 hds",
"h98fh dsh s98hf89",
"hfsdh98hfsd",
"h9 fhs98dshf 9hsd",
"h sfdhh fsd",
"hfs8h8hdh8 hds sfd8"
] | [
"12' ggg",
"<>dfdg 444",
"dfgdfg/dfgd#RF",
"^&FTY",
"87guyF&*HUDhuf sdh iusfdh",
"h87HFDS#VC",
"8fhuds ^R@#",
"G*& Fgydfus78",
"@&TGYDfdhs hudis",
"@#RhBfds uFDH hsudf",
"#FUBHDSf sdhufisdh 23rHUDSA",
"f$RFT fsdjifsd dsfhu3 #F D"
] | 523 |
^([8-9])([1-9])(\d{2})(-?|\040?)(\d{4})$ | A regular expression that validates the any of the new formats of cellular phones numbers in Peru, allows an optional dash in the middle of the number. | A regular expression that validates the any of the new formats of cellular phones numbers in Peru, allows an optional dash in the middle of the number.
Match examples:
- "8874-2544"
- "99106800"
- "84509955"
Non-match examples:
- "6540-9985"
- "77329390" | [
"8874-2544",
"99106800",
"84509955",
"9393-8832",
"82118484",
"94586658",
"99252265",
"8709-7979",
"92016063",
"87691202",
"9532 4867",
"94044065",
"89862912"
] | [
"6540-9985",
"77329390",
"725-2763",
"48948656489",
"4849",
"489655148",
"4587486",
"84652651651",
"432/524/2435",
"adfa2",
"abc111def",
"++63453.345"
] | 525 |
^(\$)?((\d+)|(\d{1,3})(\,\d{3})*)(\.\d{2,})?$ | This pattern handles currency including the following:
optional period with two or more digits to the right of the period
optional commas
optional dollar sign($) | This pattern handles currency including the following:
- optional period with two or more digits to the right of the period
- optional commas
- optional dollar sign($)
Match examples:
- "$3,333,333,333"
- "$333333"
- "$3,333.33"
Non-match examples:
- "3,33"
- "3333,333,333" | [
"$3,333,333,333",
"$333333",
"$3,333.33",
"$46",
"$79",
"$1",
"$21",
"$645",
"$65",
"$468",
"$87",
"$978",
"$61"
] | [
"3,33",
"3333,333,333",
"333.3",
"12/123/4322",
"51:534",
"$23a.454",
"@#dfkjnav",
"98iojk",
"[email protected]",
"adfa2",
"abc111def",
"0j0jweBBBB"
] | 526 |
^(?!\d[1]{2}|[5]{3})([2-9]\d{2})([. -]*)\d{4}$ | Validates *usable* US telephone numbers (possibly Canadian and Caribbean Islands as well?) Numbers cannot beginning with zero, one, (any number)11, or 555. It will allow either a hyphen, space or period as a separator.
Technically (and contrary to popular belief) most 555- numbers ARE valid numbers [see http://www.nanpa.com/nas/public/form555MasterReport.do?method=display555MasterReport ] but they are unlikely to be used by normal folks. Therefore, excluding them with this regex is useful to prevent bogus/fraudulent telephone numbers in forms.
FYI, the fictitious 555- numbers used in the movies and TV are only in the range of 555-0100 through 555-0199. Not very many, huh? | Validates *usable* US telephone numbers. Numbers cannot beginning with zero, one, (any number)11, or 555. It will allow either a hyphen, space or period as a separator.
Match examples:
- "222-2222"
- "295-5000"
- "798-7534"
Non-match examples:
- "555-1234"
- "411-5555" | [
"222-2222",
"295-5000",
"798-7534",
"486-8378",
"468-8798",
"489-7912",
"789-5164",
"984-1569",
"987-1234",
"654-1234",
"987-9876",
"489-9878",
"321-4587"
] | [
"555-1234",
"411-5555",
"099-9999",
"059-5846",
"048-4189",
"048-4895",
"485618945",
"4561495312",
"49846843846",
"4684",
"684646",
"465sdf"
] | 527 |
^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$ | US Phone Number: This regular expression for US phone numbers conforms to NANP A-digit and D-digit requirments (ANN-DNN-NNNN). Area Codes 001-199 are not permitted; Central Office Codes 001-199 are not permitted. Format validation accepts 10-digits without delimiters, optional parens on area code, and optional spaces or dashes between area code, central office code and station code. Acceptable formats include 2225551212, 222 555 1212, 222-555-1212, (222) 555 1212, (222) 555-1212, etc. You can add/remove formatting options to meet your needs. | US Phone Number: This regular expression for US phone numbers conforms to NANP A-digit and D-digit requirments (ANN-DNN-NNNN). Area Codes 001-199 are not permitted; Central Office Codes 001-199 are not permitted. Format validation accepts 10-digits without delimiters, optional parens on area code, and optional spaces or dashes between area code, central office code and station code. Acceptable formats include 2225551212, 222 555 1212, 222-555-1212, (222) 555 1212, (222) 555-1212, etc.
Match examples:
- "5305551212"
- "(530) 555-1212"
- "530-555-1212"
Non-match examples:
- "0010011212"
- "1991991212" | [
"5305551212",
"(530) 555-1212",
"530-555-1212",
"(308) 991 9471",
"624862 8252",
"431870 9196",
"4765973192",
"8624823400",
"358 4687764",
"607 401 9059",
"(399)707-0620",
"(498) 6036227",
"300559-7543"
] | [
"0010011212",
"1991991212",
"123) not-good",
"g78sdafuhu",
"g78yufsgd87y",
"f67d",
"67fty8gs",
"8y7fgsgf",
"432/524/2435",
"1-1-2",
"(0xx12) 62509",
"12/132/90"
] | 529 |
^(((\d{4}((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])))|((\d{2}[02468][048]|\d{2}[13579][26]))0229)){0,8}$ | Validates a date expression (or empty value) in CCYYMMDD format, checking a leap year from 00000101 A.D. to 99991231 | Validates a date expression (or empty value) in CCYYMMDD format, checking a leap year from 00000101 A.D. to 99991231
Match examples:
- "20041231"
- "20040229"
- "20040612"
Non-match examples:
- "20043112"
- "2003/04/02" | [
"20041231",
"20040229",
"20040612",
"20040809",
"20040616",
"20041009",
"32151112",
"32150913",
"32141113",
"32151103",
"32571113",
"32151107",
"32461113"
] | [
"20043112",
"2003/04/02",
"34f2vf42e",
"12/123/4322",
"2346-2345-2435",
"$23.454",
"89561248",
"15414894",
"49846348",
"341.431v4f3.fv1",
"abc111def",
"12/132/90"
] | 531 |