diff --git a/DatasetCollection/datacollection_test.py b/DatasetCollection/datacollection_test.py
new file mode 100644
index 0000000..5b12843
--- /dev/null
+++ b/DatasetCollection/datacollection_test.py
@@ -0,0 +1,42 @@
+import requests
+from bs4 import BeautifulSoup
+
+def get_table_data(table_data, html_content):
+ soup = BeautifulSoup(html_content, "html.parser")
+ tables = soup.find_all('table', class_='searchResultsTable')
+
+ for table in tables:
+ expression_data = {}
+
+ # Extract expression, description, matches, and non-matches
+ expression_data['id'] = len(table_data) + 1
+ details_link = table.find('a', class_='buttonSmall', href=True)
+ if details_link:
+ expression_data['details_link'] = "https://regexlib.com/"+details_link['href'].replace('RETester.aspx', 'REDetails.aspx')
+ expression_data['expression'] = table.find('tr', class_='expression').find('div', class_='expressionDiv').text.strip()
+ expression_data['description'] = table.find('tr', class_='description').find('div', class_='overflowFixDiv').text.strip()
+ expression_data['matches'] = table.find('tr', class_='matches').find('div', class_='overflowFixDiv').text.strip()
+ expression_data['non_matches'] = table.find('tr', class_='nonmatches').find('div', class_='overflowFixDiv').text.strip()
+
+ # Append data to the list
+ table_data.append(expression_data)
+
+ return table_data
+
+table_data = []
+
+for i in range(1, 43):
+ url = "https://regexlib.com/Search.aspx?k=&c=-1&m=-1&ps=100&p=" + str(i)
+ response = requests.get(url)
+ if response.status_code == 200:
+ html_content = response.text
+ table_data = get_table_data(table_data, html_content)
+ print(len(table_data))
+ print(table_data[-1])
+ else:
+ print(f"Failed to fetch data for page {i}")
+
+# Save data to JSON file
+import json
+with open('./test.json', 'w') as f:
+ json.dump(table_data, f)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..ae81b93
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+# Use the continuumio/anaconda3 base image
+FROM continuumio/anaconda3
+
+# Set the working directory inside the container
+WORKDIR /app
+
+# Copy the contents of the ReDos_Benchmarking directory into the container at /app
+COPY ReDos_Benchmarking /app
+
+# Install dependencies
+RUN pip install datasets && \
+ #conda install -c huggingface -c conda-forge datasets && \
+ pip install tqdm && \
+ apt-get update && \
+ apt-get -y install gcc mono-mcs python3-dev
+
+# Specify the command to run on container start
+CMD ["python", "-c", "from datasets import load_dataset"]
diff --git a/RegexEvalDocker/Dockerfile b/RegexEvalDocker/Dockerfile
new file mode 100644
index 0000000..ae81b93
--- /dev/null
+++ b/RegexEvalDocker/Dockerfile
@@ -0,0 +1,18 @@
+# Use the continuumio/anaconda3 base image
+FROM continuumio/anaconda3
+
+# Set the working directory inside the container
+WORKDIR /app
+
+# Copy the contents of the ReDos_Benchmarking directory into the container at /app
+COPY ReDos_Benchmarking /app
+
+# Install dependencies
+RUN pip install datasets && \
+ #conda install -c huggingface -c conda-forge datasets && \
+ pip install tqdm && \
+ apt-get update && \
+ apt-get -y install gcc mono-mcs python3-dev
+
+# Specify the command to run on container start
+CMD ["python", "-c", "from datasets import load_dataset"]
diff --git a/RegexEvalDocker/datacollection_test.py b/RegexEvalDocker/datacollection_test.py
new file mode 100644
index 0000000..5b12843
--- /dev/null
+++ b/RegexEvalDocker/datacollection_test.py
@@ -0,0 +1,42 @@
+import requests
+from bs4 import BeautifulSoup
+
+def get_table_data(table_data, html_content):
+ soup = BeautifulSoup(html_content, "html.parser")
+ tables = soup.find_all('table', class_='searchResultsTable')
+
+ for table in tables:
+ expression_data = {}
+
+ # Extract expression, description, matches, and non-matches
+ expression_data['id'] = len(table_data) + 1
+ details_link = table.find('a', class_='buttonSmall', href=True)
+ if details_link:
+ expression_data['details_link'] = "https://regexlib.com/"+details_link['href'].replace('RETester.aspx', 'REDetails.aspx')
+ expression_data['expression'] = table.find('tr', class_='expression').find('div', class_='expressionDiv').text.strip()
+ expression_data['description'] = table.find('tr', class_='description').find('div', class_='overflowFixDiv').text.strip()
+ expression_data['matches'] = table.find('tr', class_='matches').find('div', class_='overflowFixDiv').text.strip()
+ expression_data['non_matches'] = table.find('tr', class_='nonmatches').find('div', class_='overflowFixDiv').text.strip()
+
+ # Append data to the list
+ table_data.append(expression_data)
+
+ return table_data
+
+table_data = []
+
+for i in range(1, 43):
+ url = "https://regexlib.com/Search.aspx?k=&c=-1&m=-1&ps=100&p=" + str(i)
+ response = requests.get(url)
+ if response.status_code == 200:
+ html_content = response.text
+ table_data = get_table_data(table_data, html_content)
+ print(len(table_data))
+ print(table_data[-1])
+ else:
+ print(f"Failed to fetch data for page {i}")
+
+# Save data to JSON file
+import json
+with open('./test.json', 'w') as f:
+ json.dump(table_data, f)
diff --git a/RegexEvalDocker/test.json b/RegexEvalDocker/test.json
new file mode 100644
index 0000000..8b8fa65
--- /dev/null
+++ b/RegexEvalDocker/test.json
@@ -0,0 +1 @@
+[{"id": 1, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=1", "expression": "^\\d$", "description": "Matches exactly 1 numeric digit (0-9).", "matches": "1 | 2 | 3", "non_matches": "a | 324 | num"}, {"id": 2, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=2", "expression": "^\\d{5}$", "description": "Matches 5 numeric digits, such as a zip code.", "matches": "33333 | 55555 | 23445", "non_matches": "abcd | 1324 | as;lkjdf"}, {"id": 3, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=3", "expression": "^\\d{5}-\\d{4}$", "description": "Numeric and hyphen 5+4 ZIP code match for ZIP+4.", "matches": "22222-3333 | 34545-2367 | 56334-2343", "non_matches": "123456789 | A3B 4C5 | 55335"}, {"id": 4, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=4", "expression": "^\\d{5}$|^\\d{5}-\\d{4}$", "description": "This regular expression will match either a 5 digit ZIP code or a ZIP+4 code formatted as 5 digits, a hyphen, and another 4 digits. Other than that, this is just a really really long description of a regular expression that I'm using to test how my front page will look in the case where very long expression descriptions are used.", "matches": "55555-5555 | 34564-3342 | 90210", "non_matches": "434454444 | 645-32-2345 | abc"}, {"id": 5, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=9", "expression": "^\\d{3}-\\d{2}-\\d{4}$", "description": "This regular expression will match a hyphen-separated Social Security Number (SSN) in the format NNN-NN-NNNN.", "matches": "333-22-4444 | 123-45-6789", "non_matches": "123456789 | SSN"}, {"id": 6, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=10", "expression": "^[a-zA-Z]$", "description": "Matches any single upper- or lower-case letter.", "matches": "a | B | c", "non_matches": "0 | & | AbC"}, {"id": 7, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=11", "expression": "^[a-zA-Z]+$", "description": "Matches any string of only upper- and lower- case letters (no spaces).", "matches": "abc | ABC | aBcDeF", "non_matches": "abc123 | mr. | a word"}, {"id": 8, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=12", "expression": "^[a-zA-Z0-9]+$", "description": "Matches any alphanumeric string (no spaces).", "matches": "10a | ABC | A3fg", "non_matches": "45.3 | this or that | $23"}, {"id": 9, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=13", "expression": "^\\d+$", "description": "Positive integer value.", "matches": "123 | 10 | 54", "non_matches": "-54 | 54.234 | abc"}, {"id": 10, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=14", "expression": "^(\\+|-)?\\d+$", "description": "Matches any signed integer.", "matches": "-34 | 34 | +5", "non_matches": "abc | 3.1415 | -5.3"}, {"id": 11, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=15", "expression": "^[a-zA-Z]\\w{3,14}$", "description": "The password's first character must be a letter, it must contain at least 4 characters and no more than 15 characters and no characters other than letters, numbers and the underscore may be used", "matches": "abcd | aBc45DSD_sdf | password", "non_matches": "afv | 1234 | reallylongpassword"}, {"id": 12, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=16", "expression": "^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$", "description": "Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters (which is fine until they allow more). Doesn't handle multiple "." in the domain ([email\u00a0protected]).", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 13, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=17", "expression": "^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$", "description": "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.", "matches": "4/1/2001 | 12/12/2001 | 55/5/3434", "non_matches": "1/1/01 | 12 Jan 01 | 1-1-2001"}, {"id": 14, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=18", "expression": "foo", "description": "The "hello world" of regular expressions, this will match any string with an instance of 'foo' in it.", "matches": "foo", "non_matches": "bar"}, {"id": 15, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=19", "expression": "^[1-5]$", "description": "This matches a single numeric digit between 1 and 5, and is the same as saying ^[12345]$.", "matches": "1 | 3 | 4", "non_matches": "6 | 23 | a"}, {"id": 16, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=20", "expression": "^[12345]$", "description": "This matches a single numeric digit between 1 and 5, and is the same as saying ^[1-5]$.", "matches": "1 | 2 | 4", "non_matches": "6 | -1 | abc"}, {"id": 17, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=21", "expression": "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$", "description": "This expression matches email addresses, and checks that they are of the proper form. It checks to ensure the top level domain is between 2 and 4 characters long, but does not check the specific domain against a list (especially since there are so many of them now).", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "a@b | notanemail | joe@@."}, {"id": 18, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=22", "expression": "^[2-9]\\d{2}-\\d{3}-\\d{4}$", "description": "This expression matches a hyphen separated US phone number, of the form ANN-NNN-NNNN, where A is between 2 and 9 and N is between 0 and 9.", "matches": "800-555-5555 | 333-444-5555 | 212-666-1234", "non_matches": "000-000-0000 | 123-456-7890 | 2126661234"}, {"id": 19, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=23", "expression": "^\\d{5}-\\d{4}|\\d{5}|[A-Z]\\d[A-Z] \\d[A-Z]\\d$", "description": "This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.", "matches": "44240 | 44240-5555 | G3H 6A3", "non_matches": "Ohio | abc | g3h6a3"}, {"id": 20, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=25", "expression": "^[a-zA-Z0-9\\-\\.]+\\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$", "description": "Domain names:\nThis regular expression tests the validity of a domain or hostname. It will match any valid domain name that does not contain characters which are invalid in URLs, and which ends in .com, .org, .net, .mil, or .edu. You can add additional valid TLDs by appending the | (pipe) character and the desired TLD to the list in the parens.", "matches": "3SquareBand.com | asp.net | army.mil", "non_matches": "$SquareBand.com | asp/dot.net | army.military"}, {"id": 21, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=26", "expression": "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$", "description": "Email validator that adheres directly to the specification for email address naming. It allows for everything from ipaddress and country-code domains, to very rare characters in the username.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "joe | @foo.com | a@a"}, {"id": 22, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=27", "expression": "((\\(\\d{3}\\) ?)|(\\d{3}-))?\\d{3}-\\d{4}", "description": "US Phone Number -- doesn't check to see if first digit is legal (not a 0 or 1).", "matches": "(123) 456-7890 | 123-456-7890", "non_matches": "1234567890"}, {"id": 23, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=28", "expression": "[\\w-]+@([\\w-]+\\.)+[\\w-]+", "description": "Yet another simple email validator expression.", "matches": "[email\u00a0protected] | [email\u00a0protected]", "non_matches": "asdf | 1234"}, {"id": 24, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=29", "expression": "\\d{4}-?\\d{4}-?\\d{4}-?\\d{4}", "description": "Major credit card validator. Only checks that the format is 16 digits (optionally separated by hyphens), not the value of any of the digits.", "matches": "1234-1234-1234-1234 | 1234123412341234", "non_matches": "1234123412345"}, {"id": 25, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=30", "expression": "^(?=.*\\d).{4,8}$", "description": "Password expression. Password must be between 4 and 8 digits long and include at least one numeric digit.", "matches": "1234 | asdf1234 | asp123", "non_matches": "asdf | asdf12345 | password"}, {"id": 26, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=31", "expression": "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$", "description": "Password matching expression. Password must be at least 4 characters, no more than 8 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit.", "matches": "asD1 | asDF1234 | ASPgo123", "non_matches": "asdf | 1234 | ASDF12345"}, {"id": 27, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=32", "expression": "^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$", "description": "RegExp for validating the format of IP Addresses. This works great with the ASP.NET RegularExpressionValidator server control.", "matches": "127.0.0.1 | 255.255.255.0 | 192.168.0.1", "non_matches": "1200.5.4.3 | abc.def.ghi.jkl | 255.foo.bar.1"}, {"id": 28, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=33", "expression": "(\\w+)\\s+\\1", "description": "This expression uses a BackReference to find occurrences of the same word twice in a row (separated by a space).\nMatches things like 'mandate dated', which may not be desirable. See Sean Carley's update for a better expression for true repeated word matching.", "matches": "hubba hubba | mandate dated | an annual", "non_matches": "may day | gogo | 1212"}, {"id": 29, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=34", "expression": "\\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\\)\\s*[0-9]{3,4}[- ]*[0-9]{4}", "description": "Match diferent styles for brazilian Phone number code.\nOnly DDD (12), complete DDD (012), complete DDD + Telephony Company (0xx12) plus 3 or 4 digits (city code) plus 4 digits (phone number).", "matches": "(12) 123 1234 | (01512) 123 1234 | (0xx12) 1234 1234", "non_matches": "12 123 1234 | (012) 123/1234 | (012) 123 12345"}, {"id": 30, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=35", "expression": "^\\w+[\\w-\\.]*\\@\\w+((-\\w+)|(\\w*))\\.[a-z]{2,3}$", "description": "Email validation. With this short expression you can validate for proper email format. It's short and accurate.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | smith@foo_com"}, {"id": 31, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=36", "expression": "^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$", "description": "Tests for valid HTML hexadecimal color codes. The # symbol is optional. And it will except either the 3 digit form for the 216 Web safe colors, or the full 6 digit form. I am use it on my site to allow users to customize the site's colors.", "matches": "#00ccff | #039 | ffffcc", "non_matches": "blue | 0x000000 | #ff000"}, {"id": 32, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=37", "expression": "((mailto\\:|(news|(ht|f)tp(s?))\\://){1}\\S+)", "description": "Regular Expression matches any internet URLs. Used with the replace method it comes in very handy.", "matches": "http://www.aspemporium.com | mailto:[email\u00a0protected] | ftp://ftp.test.com", "non_matches": "www.aspemporium.com | [email\u00a0protected] | bloggs"}, {"id": 33, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=38", "expression": "^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$", "description": "Matches UK postcodes according to the following rules\n1. LN NLL eg N1 1AA\n2. LLN NLL eg SW4 0QL\n3. LNN NLL eg M23 4PJ\n4. LLNN NLL eg WS14 0JT\n5. LLNL NLL eg SW1N 4TB\n6. LNL NLL eg W1C 8LQ\nThanks to Simon Bell for informing me of LNL NLL rule for postcodes which I had omitted in an earlier version.", "matches": "G1 1AA | EH10 2QQ | SW1 1ZZ", "non_matches": "G111 1AA | X10 WW | DDD 5WW"}, {"id": 34, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=39", "expression": "^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w]{2,3}$", "description": "Much simpler email expression. This one forces a length of 2 or 3, which fits current specs, but you may need to alter the end as this one allows all numerals on the .COM section.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "word | word@ | @word"}, {"id": 35, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=40", "expression": "/\\*[\\d\\D]*?\\*/", "description": "If you need to extract or remove any /* */ sytle comments from any Java, JavaScript, C, C++, CSS, etc code you have this regular expression can help.", "matches": "/* my comment */ | /* my multiline comment */ | /* my nested comment */", "non_matches": "*/ anything here /* | anything between 2 seperate comments | \\* *\\"}, {"id": 36, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=41", "expression": "^\\$[0-9]+(\\.[0-9][0-9])?$", "description": "Validates a dollar amount including a dollar sign and 2 decmals. The decimal and cents are optional.", "matches": "$1.50 | $49 | $0.50", "non_matches": "1.5 | $1.333 | this $5.12 fails"}, {"id": 37, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=42", "expression": "\\b(([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\b", "description": "Most Concise RegExp for matching Decimal IPs. If nothing else, it'll make your code easier to read. (And I know that \\d?\\d is \\d{1,2} but that's 2 extra characters.)\n--Update: darkone noticed 8 characters could be shaved down. I've edited it to reflect this. Thanks, darkone!", "matches": "217.6.9.89 | 0.0.0.0 | 255.255.255.255", "non_matches": "256.0.0.0 | 0978.3.3.3 | 65.4t.54.3"}, {"id": 38, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=43", "expression": "(AUX|PRN|NUL|COM\\d|LPT\\d)+\\s*$", "description": ""Be careful when opening or creating files by using Scripting File System Object. If the filename is based on the user's input, the user might attempt to open a serial port or printer."", "matches": "COM1 | AUX | LPT1", "non_matches": "image.jpg | index.html | readme.txt"}, {"id": 39, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=44", "expression": "^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$", "description": "This re was used for a security routine. The format is:\n[user=name1,name2,...,nameN;][group=group1,group2,...,groupN;][level=number;]\nEach component is optional, but they must appear the in order listed if applicable.", "matches": "user=foo,bar,quux;group=manager,admin;level=100; | group=nobody;level=24;", "non_matches": "user=foo | blahh"}, {"id": 40, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=45", "expression": "^\\D?(\\d{3})\\D?\\D?(\\d{3})\\D?(\\d{4})$", "description": "This RegEx requires a US phone number WITH area code. It is written to all users to enter whatever delimiters they want or no delimiters at all (i.e. 111-222-3333, or 111.222.3333, or (111) 222-3333, or 1112223333, etc...).", "matches": "(111) 222-3333 | 1112223333 | 111-222-3333", "non_matches": "11122223333 | 11112223333 | 11122233333"}, {"id": 41, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=46", "expression": "^([\\w\\d\\-\\.]+)@{1}(([\\w\\d\\-]{1,67})|([\\w\\d\\-]+\\.[\\w\\d\\-]{1,67}))\\.(([a-zA-Z\\d]{2,4})(\\.[a-zA-Z\\d]{2})?)$", "description": "This pattern allows standard e-mail addresses (e.g. [email\u00a0protected]), sub domains (e.g. [email\u00a0protected]), the new two- and four-letter domains (e.g. [email\u00a0protected] and [email\u00a0protected]) and country codes (e.g. [email\u00a0protected]). Also, this patter follows the Network Solutions standard length of 67 characters for top-level domains. The reason I allow numbers to be entered in the domain suffix is for future planning. If you do not want numbers to be able to be added as a domain suffix (e.g. [email\u00a0protected]), simply delete the last two occurrences of "\\d".", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | foo@[email\u00a0protected]"}, {"id": 42, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=47", "expression": "^[0-9]+$", "description": "Validate a string to see if it contains a number / integer", "matches": "1234567890 | 1234567890 | 1234567890", "non_matches": "http://none | http://none | http://none"}, {"id": 43, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=48", "expression": "^(\\d{4}[- ]){3}\\d{4}|\\d{16}$", "description": "Credit card validator. Just checks that the format is either 16 numbers in groups of four separated by a "-" or a " " or nothing at all.", "matches": "1234-1234-1234-1234 | 1234 1234 1234 1234 | 1234123412341234", "non_matches": "Visa | 1234 | 123-1234-12345"}, {"id": 44, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=49", "expression": "^((4\\d{3})|(5[1-5]\\d{2})|(6011))-?\\d{4}-?\\d{4}-?\\d{4}|3[4,7]\\d{13}$", "description": "Matches major credit cards including:\nVisa (length 16, prefix 4), Mastercard (length 16, prefix 51-55), Discover (length 16, prefix 6011), American Express (length 15, prefix 34 or 37). All 16 digit formats accept optional hyphens (-) between each group of four digits.", "matches": "6011-1111-1111-1111 | 5423-1111-1111-1111 | 341111111111111", "non_matches": "4111-111-111-111 | 3411-1111-1111-111 | Visa"}, {"id": 45, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=50", "expression": "^.{4,8}$", "description": "Matches any string between 4 and 8 characters in length. Limits the length of a string. Useful to add to password regular expressions.", "matches": "asdf | 1234 | asdf1234", "non_matches": "asd | 123 | asdfe12345"}, {"id": 46, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=51", "expression": "^\\d*$", "description": "Accepts an unsigned integer number. Also matches empty strings.", "matches": "123 | 000 | 43", "non_matches": "asbc | -34 | 3.1415"}, {"id": 47, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=52", "expression": "^[-+]?\\d*$", "description": "Matches any integer number or numeric string, including positive and negative value characters (+ or -). Also matches empty strings.", "matches": "123 | -123 | +123", "non_matches": "abc | 3.14159 | -3.14159"}, {"id": 48, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=53", "expression": "^\\d*\\.?\\d*$", "description": "Matches any unsigned floating point number/numeric string. Also matches empty strings.", "matches": "123 | 3.14159 | .234", "non_matches": "abc | -3.14159 | 3.4.2"}, {"id": 49, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=54", "expression": "^[-+]?\\d*\\.?\\d*$", "description": "Matches any floating point numer/numeric string, including optional sign character (+ or -). Also matches empty strings.", "matches": "123 | +3.14159 | -3.14159", "non_matches": "abc | 3.4.5 | $99.95"}, {"id": 50, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=55", "expression": "^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$", "description": "GUID Tester. It tests SQL Server GUIDs, which are alphanumeric characters grouped 8-4-4-4-12 (with the dashes). Make sure they don't have the brackets around them before you check them and have fun!", "matches": "4D28C5AD-6482-41CD-B84E-4573F384BB5C | B1E1282C-A35C-4D5A-BF8B-7A3A51D9E388 | 91036A4A-A0F4-43F0-8CD", "non_matches": "{B1E1282C-A35C-4D3A-BF8B-7A3A51D9E388} | AAAAAAAAAAAAAAAAA | B;E1282C-A35C-4D3A-BF8B-7A3A51D9E38"}, {"id": 51, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=56", "expression": "(\\w+?@\\w+?\\x2E.+)", "description": "Validates an email address", "matches": "[email\u00a0protected]", "non_matches": "[AABB]"}, {"id": 52, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=57", "expression": "Last.*?(\\d+.?\\d*)", "description": "Plucks the last quote of a Stock from the MSN MoneyCentral WebQuote page for any given stock symbol. The URL of the web page where this RegEx should be applied is:\nhttp://localhost/asp/webquote.htm?ipage=qd&Symbol=,give the stock symbol here> You must also use the singleline option.", "matches": "<TR><TD ALIGN=RIGHT> </TD><TD>Last</TD><TD ALIGN=RIGHT NOW", "non_matches": "[AADDSS]"}, {"id": 53, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=58", "expression": "^([0-9]( |-)?)?(\\(?[0-9]{3}\\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$", "description": "Matches US phone number format. 1 in the beginning is optional, area code is required, spaces or dashes can be used as optional divider between number groups. Also alphanumeric format is allowed after area code.", "matches": "1-(123)-123-1234 | 123 123 1234 | 1-800-ALPHNUM", "non_matches": "1.123.123.1234 | (123)-1234-123 | 123-1234"}, {"id": 54, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=59", "expression": "^([0-1][0-9]|[2][0-3]):([0-5][0-9])$", "description": "Matches a string if it is a valid time in the format of HH:MM", "matches": "02:04 | 16:56 | 23:59", "non_matches": "02:00 PM | PM2:00 | 24:00"}, {"id": 55, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=60", "expression": "^[0,1]?\\d{1}\\/(([0-2]?\\d{1})|([3][0,1]{1}))\\/(([1]{1}[9]{1}[9]{1}\\d{1})|([2-9]{1}\\d{3}))$", "description": "This expression checks the validity of a date (US, but it is easily editable for other format's). Year's 1990-9999, Month's 1 or 01 to 12, Day's 1 or 01 to 31. Still needs to have individual months added (i.e., Feb's 28 days), and some how to check for leap year...the months issue should not be to hard, but the leap year seems like a real chore. Please let me know if you have any suggestions for leap year.", "matches": "01/01/1990 | 12/12/9999 | 3/28/2001", "non_matches": "3-8-01 | 13/32/1001 | 03/32/1989"}, {"id": 56, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=61", "expression": "((\\(\\d{3}\\)?)|(\\d{3}))([\\s-./]?)(\\d{3})([\\s-./]?)(\\d{4})", "description": "US Phone number that accept a dot, a space, a dash, a forward slash, between the numbers. Will Accept a 1 or 0 in front. Area Code not necessary", "matches": "1.2123644567 | 0-234.567/8912 | 1-(212)-123 4567", "non_matches": "0-212364345 | 1212-364,4321 | 0212\\345/6789"}, {"id": 57, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=62", "expression": "^\\s*[a-zA-Z,\\s]+\\s*$", "description": "Any Expression Upper/Lower Case, with commas and space between the text, with any amount of space before or after", "matches": "Smith, Ed | Ed Smith | aBcDeFgH", "non_matches": "a123 | AB5 | Mr. Ed"}, {"id": 58, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=63", "expression": "^[a-zA-Z0-9\\s.\\-]+$", "description": "ANY alphanumeric string with spaces, commas, dashes.", "matches": "2222 Mock St. | 1 A St. | 555-1212", "non_matches": "[A Street] | (3 A St.) | {34 C Ave.}"}, {"id": 59, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=64", "expression": "\\[link=\"(?((.|\\n)*?))\"\\](?((.|\\n)*?))\\[\\/link\\]", "description": "This can be used in conjunction with the replace method to provide pseudo-code support without having to enable HTML. The replacement string (in ASP.NET, use RegExp.Replace(SourceString, RegularExpressionPattern, ReplacementString) is <a href="${link}">${text}</a>.", "matches": "[link=\"http://www.yahoo.com\"]Yahoo[/link]", "non_matches": "[link]http://www.yahoo.com[/link] | [link=http://www.yahoo.com]Yahoo[/link]"}, {"id": 60, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=65", "expression": "[0-9]{4}\\s*[a-zA-Z]{2}", "description": "Dutch zip code expression\n4 numbers - space yes/no - 2 letters", "matches": "1054 WD | 1054WD | 1054 wd", "non_matches": "10543"}, {"id": 61, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=66", "expression": "(^1300\\d{6}$)|(^1800|1900|1902\\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\\d{4}$)|(^04\\d{2,3}\\d{6}$)", "description": "Australian phone numbers: Matches all known formats incl normal 10-digit landline numbers (valid area code mandatory) 13, 1300, 1800, 1900, 1902 plus mobile 10 and 11-digit formats. Use a Replace function first to remove non-numerics which are probably separators (E.g. newNum = number.replace(/[\\D]/g, ""). Please contact me if you find any valid Aussie numbers being rejected.", "matches": "0732105432 | 1300333444 | 131313", "non_matches": "32105432 | 13000456"}, {"id": 62, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=67", "expression": "(^(4|5)\\d{3}-?\\d{4}-?\\d{4}-?\\d{4}|(4|5)\\d{15})|(^(6011)-?\\d{4}-?\\d{4}-?\\d{4}|(6011)-?\\d{12})|(^((3\\d{3}))-\\d{6}-\\d{5}|^((3\\d{14})))", "description": "This provides an expression to calidate the four major credit cards. It can be easily broken up to use for a specific type of card. It does not validate the number being a potential real number, only in the correct format.", "matches": "4111-1234-1234-1234 | 6011123412341234 | 3711-123456-12345", "non_matches": "1234567890123456 | 4111-123-1234-1234 | 412-1234-1234-1234"}, {"id": 63, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=68", "expression": "^([0-9]{6}[\\s\\-]{1}[0-9]{12}|[0-9]{18})$", "description": "This regular expression matches 'Switch' card numbers - a payment method used extensively in the UK.", "matches": "000000 000000000000 | 000000-000000000000 | 000000000000000000", "non_matches": "000000_000000000000"}, {"id": 64, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=69", "expression": "^(([1-9])|(0[1-9])|(1[0-2]))\\/((0[1-9])|([1-31]))\\/((\\d{2})|(\\d{4}))$", "description": "Matches U.S. dates with leading zeros and without and with 2 or four digit years", "matches": "01/01/2001 | 1/1/2001 | 01/1/01", "non_matches": "13/01/2001 | 1/2/100 | 09/32/2001"}, {"id": 65, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=70", "expression": "^\\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$", "description": "Matches currency input with or without commas.", "matches": "$3,023,123.34 | 9,876,453 | 123456.78", "non_matches": "4,33,234.34 | $1.234 | abc"}, {"id": 66, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=71", "expression": "((\\d{2})|(\\d))\\/((\\d{2})|(\\d))\\/((\\d{4})|(\\d{2}))", "description": "This matches simple dates against 1 or 2 digits for the month, 1 or 2 digit for the day, and either 2 or 4 digits for the year", "matches": "4/5/91 | 04/5/1991 | 4/05/89", "non_matches": "4/5/1"}, {"id": 67, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=73", "expression": "^(\\(?\\+?[0-9]*\\)?)?[0-9_\\- \\(\\)]*$", "description": "A regular expression to match phone numbers, allowing for an international dialing code at the start and hyphenation and spaces that are sometimes entered.", "matches": "(+44)(0)20-12341234 | 02012341234 | +44 (0) 1234-1234", "non_matches": "(44+)020-12341234 | 12341234(+020)"}, {"id": 68, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=74", "expression": "^\\d{5}(-\\d{4})?$", "description": "Matches standard 5 digit US Zip Codes, or the US ZIP + 4 Standard.", "matches": "48222 | 48222-1746", "non_matches": "4632 | Blake | 37333-32"}, {"id": 69, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=75", "expression": "(^\\+[0-9]{2}|^\\+[0-9]{2}\\(0\\)|^\\(\\+[0-9]{2}\\)\\(0\\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\\-\\s]{10}$)", "description": "Regular expression to evaluate dutch-style phone numbers. Possible example prefixes: +31, +31(0), (+31)(0), 0, 0031\nfollowed by 9 numbers (which can contain a space or -).", "matches": "+31235256677 | +31(0)235256677 | 023-5256677", "non_matches": "+3123525667788999 | 3123525667788 | 232-2566778"}, {"id": 70, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=76", "expression": "^[0-9]{4}\\s{0,1}[a-zA-Z]{2}$", "description": "Regular expression to evaluate dutch zipcodes. This is an updated version of Roland Mensenkamp.", "matches": "2034AK | 2034 AK | 2034 ak", "non_matches": "2034 AK | 321321 AKSSAA"}, {"id": 71, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=77", "expression": "(^|\\s|\\()((([1-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\\/-]((2[0-9]){1}|(3[01]){1}|([01][1-9]){1}|([1-9]){1}){1}[\\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\\s|\\)|:])|(^|\\s|\\()((([0-9]){1}|([0][1-9]){1}|([1][012]){1}){1}[\\/-](([11-31]){1}|([01][1-9]){1}|([1-9]){1}){1}[\\/-](((19|20)([0-9][0-9]){1}|([0-9][0-9]){1})){1}(([\\s|\\)|:|$|\\>])){1}){1}){1}){1}", "description": "Will match the following date formats: Preceded by a Space, Left-parentheses, or at the beginning of a line. Followed by a Space, Right-parentheses, or Colon(:), word boundary or End of line. Can have / or - as separator. Accepts 2 digit year 00-99 or 4 digit years 1900-2099 (can modify to accept any range)", "matches": "01/01/2001 | 01-01-2001: | (1-1-01)", "non_matches": "13/1/2001 | 1-32-2001 | 1-1-1801"}, {"id": 72, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=78", "expression": "\\b(\\w+)\\s+\\1\\b", "description": "Uses backreferences and word boundaries to match repeated words seperated by whitespace without matching a word with the same ending as the next words beginning.", "matches": "Tell the the preacher | some some | hubba hubba", "non_matches": "once an annual report | mandate dated submissions | Hubba hubba"}, {"id": 73, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=79", "expression": "^\\d{9}[\\d|X]$", "description": "A very simple ISBN validation expression - it just checks for a 10 digit number where the last digit could also be a capital 'X'. Complete specs for ISBN available here:\nhttp://www.isbn.org/standards/home/isbn/international/html/usm4.htm. An enhancement would be to allow exactly 3 or 0 hyphens or 3 or 0 spaces, since these are also valid formats.", "matches": "1234123412 | 123412341X", "non_matches": "not an isbn"}, {"id": 74, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=80", "expression": "^(([1-9])|(0[1-9])|(1[0-2]))\\/(([0-9])|([0-2][0-9])|(3[0-1]))\\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$", "description": "Dates\nday: d or dd, <= 31,\nmonth: m or mm, <= 12,\nyear: yy or yyyy >= 1900, <= 2099", "matches": "01/01/2001 | 1/1/1999 | 10/20/2080", "non_matches": "13/01/2001 | 1/1/1800 | 10/32/2080"}, {"id": 75, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=82", "expression": "^\\d*\\.?((25)|(50)|(5)|(75)|(0)|(00))?$", "description": "This is a pattern to search and verify that a decimal number ends with a 25, 50, 75, 0 or 00. It does match for a nothing after decimal also but I guess thats ok !!", "matches": "0.25 | .75 | 123.50", "non_matches": ".77 | 1.435"}, {"id": 76, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=83", "expression": "^(s-|S-){0,1}[0-9]{3}\\s?[0-9]{2}$", "description": "Validates swedish zipcodes (postnr) with or without space between groups. With leading s- or not. Can be disconnected by removing ''(s-|S-){0,1}''.", "matches": "12345 | 932 68 | S-621 46", "non_matches": "5367 | 425611 | 31 545"}, {"id": 77, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=84", "expression": "((0?[13578]|10|12)(-|\\/)((0[0-9])|([12])([0-9]?)|(3[01]?))(-|\\/)((\\d{4})|(\\d{2}))|(0?[2469]|11)(-|\\/)((0[0-9])|([12])([0-9]?)|(3[0]?))(-|\\/)((\\d{4}|\\d{2})))", "description": "Regex used in .NET to validate a date. Matches the following formats mm/dd/yy, mm/dd/yyyy, mm-dd-yy, mm-dd-yyyy\nThis covers days with 30 or 31 days but does not handle February, it is allowed 30 days.", "matches": "1/31/2002 | 04-30-02 | 12-01/2002", "non_matches": "2/31/2002 | 13/0/02 | Jan 1, 2001"}, {"id": 78, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=85", "expression": "^(?!^(PRN|AUX|CLOCK\\$|NUL|CON|COM\\d|LPT\\d|\\..*)(\\..+)?$)[^\\x00-\\x1f\\\\?*:\\\";|/]+$", "description": "Checks for a valid windows file name (Must be used with the case-insensitive option\nChecks that the file has at lease one char, does not contain any invalid characters and does not have a reserved word as a file name.\n"If you see a " in the regex replace it with a " character"", "matches": "test.txt | test.jpg.txt | a&b c.bmp", "non_matches": "CON | .pdf | test:2.pdf"}, {"id": 79, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=86", "expression": "<[^>]*\\n?.*=("|')?(.*\\.jpg)("|')?.*\\n?[^<]*>", "description": "Match any image insert in a tag .\nsimply replace the .jpg in the pattern whit a variable of content type ex:.swf,.js,.gif and loop the pattern to retrieve all tag whit the contenttype pass trought....\nVery useful when you have people uploading html document in your site and you want to retrieve all dependecy.", "matches": "<td background="../img/img.jpg" > | <img src=img.jpg > | <img src='img.jpg'", "non_matches": "= img.jpg | img.jpg"}, {"id": 80, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=87", "expression": "^(\\d{5}-\\d{4}|\\d{5})$|^([a-zA-Z]\\d[a-zA-Z] \\d[a-zA-Z]\\d)$", "description": "This is a modification of the zip code regular expression submitted by Steven Smith ([email\u00a0protected])\nIt no longer matches 78754-12aA", "matches": "78754 | 78754-1234 | G3H 6A3", "non_matches": "78754-12aA | 7875A | g3h6a3"}, {"id": 81, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=88", "expression": "^([\\w\\-\\.]+)@((\\[([0-9]{1,3}\\.){3}[0-9]{1,3}\\])|(([\\w\\-]+\\.)+)([a-zA-Z]{2,4}))$", "description": "Expression 1 of 2 used to check email address syntax.", "matches": "[email\u00a0protected] | bob.jones@[1.1.1.1] | [email\u00a0protected]", "non_matches": "bob@com | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 82, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=89", "expression": "^(([-\\w \\.]+)|(""[-\\w \\.]+"") )?<([\\w\\-\\.]+)@((\\[([0-9]{1,3}\\.){3}[0-9]{1,3}\\])|(([\\w\\-]+\\.)+)([a-zA-Z]{2,4}))>$", "description": "Expression 2 or 2 for matching email address syntax. This one matches the <angle bracket syntax>.", "matches": "<[email\u00a0protected]> | bob A. jones <[email\u00a0protected]> | bob A. jones <ab@[1.1.1.111]>", "non_matches": "[email\u00a0protected] | "bob A. jones <[email\u00a0protected]> | bob A. jones <[email\u00a0protected]>"}, {"id": 83, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=90", "expression": "^http\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(/\\S*)?$", "description": "Verifies URLs. Checks for the leading protocol, a good looking domain (two or three letter TLD; no invalid characters in domain) and a somwhat reasonable file path.", "matches": "http://psychopop.org | http://www.edsroom.com/newUser.asp | http://unpleasant.jarrin.net/markov/inde", "non_matches": "ftp://psychopop.org | http://www.edsroom/ | http://un/pleasant.jarrin.net/markov/index.asp"}, {"id": 84, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=91", "expression": "^[A-Za-z]{1,2}[0-9A-Za-z]{1,2}[ ]?[0-9]{0,1}[A-Za-z]{2}$", "description": "This regular expression can be used to validate UK postcodes. Especially useful if want to provide a client side validation on a web site.", "matches": "SW112LE | SW11 2LE | CR05LE", "non_matches": "12CR0LE | 12CR 0LE | SWLE05"}, {"id": 85, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=92", "expression": "^[A-Za-z]{2}[0-9]{6}[A-Za-z]{1}$", "description": "UK National Insurance Number validation. Especially useful to validate through clientside/server side script on a website.", "matches": "SP939393H | PX123456D | SW355667G", "non_matches": "12SP9393H | S3P93930D | 11223344SP00ddSS"}, {"id": 86, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=93", "expression": "20\\d{2}(-|\\/)((0[1-9])|(1[0-2]))(-|\\/)((0[1-9])|([1-2][0-9])|(3[0-1]))(T|\\s)(([0-1][0-9])|(2[0-3])):([0-5][0-9]):([0-5][0-9])", "description": "Sql date format tester.", "matches": "2099-12-31T23:59:59 | 2002/02/09 16:30:00 | 2000-01-01T00:00:00", "non_matches": "2000-13-31T00:00:00 | 2002/02/33 24:00:00 | 2000-01-01 60:00:00"}, {"id": 87, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=95", "expression": "^\\d{4}[\\-\\/\\s]?((((0[13578])|(1[02]))[\\-\\/\\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\\-\\/\\s]?(([0-2][0-9])|(30)))|(02[\\-\\/\\s]?[0-2][0-9]))$", "description": "- validates a yyyy-mm-dd, yyyy mm dd, or yyyy/mm/dd date\n- makes sure day is within valid range for the month\n- does NOT validate Feb. 29 on a leap year, only that Feb. CAN have 29 days", "matches": "0001-12-31 | 9999 09 30 | 2002/03/03", "non_matches": "0001\\02\\30 | 9999.15.01 | 2002/3/3"}, {"id": 88, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=96", "expression": "(http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?", "description": "*CORRECTED: Again thanks for all the comments below. If you want to include internal domain as well change the partial code (\\.[\\w-_]+)+ to (\\.[\\w-_]+)?\nSee the comments below*\nThis is the regular expression I use to add links in my email program. It also ignores those suppose-to-be commas/periods/colons at the end of the URL, like this sentence "check out http://www.yahoo.com/." (the period will be ignored) Note that it requires some modification to match ones that dont start with http.", "matches": "http://regxlib.com/Default.aspx | http://electronics.cnet.com/electronics/0-6342366-8-8994967-1.html", "non_matches": "www.yahoo.com"}, {"id": 89, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=97", "expression": "^(1?(-?\\d{3})-?)?(\\d{3})(-?\\d{4})$", "description": "US Telephone Reg expression that allows 7, 10 or 11 digits with or without hyphens.", "matches": "15615552323 | 1-561-555-1212 | 5613333", "non_matches": "1-555-5555 | 15553333 | 0-561-555-1212"}, {"id": 90, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=98", "expression": "<[^>]*name[\\s]*=[\\s]*"?[^\\w_]*"?[^>]*>", "description": "This RX is used to find get all named tags in an html string. If you find a problem with it, please email [email\u00a0protected]", "matches": "<input type = text name = "bob"> | <select name = "fred"> | <form", "non_matches": "<input type = submit> | <font face = "arial"> | The drity brown fox stank like"}, {"id": 91, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=100", "expression": "^((?:4\\d{3})|(?:5[1-5]\\d{2})|(?:6011)|(?:3[68]\\d{2})|(?:30[012345]\\d))[ -]?(\\d{4})[ -]?(\\d{4})[ -]?(\\d{4}|3[4,7]\\d{13})$", "description": "This just a minor mod to Steven Smith's credit card re to accept spaces as separators, as well as return the four parts of the card. [Updated Oct-18-2002 to work with Diners Club/Carte Blanche (prefix must be 36, 38, or 300-305)]", "matches": "6011567812345678 | 6011 5678 1234 5678 | 6011-5678-1234-5678", "non_matches": "1234567890123456"}, {"id": 92, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=101", "expression": "([a-zA-Z]:(\\\\w+)*\\\\[a-zA-Z0_9]+)?.xls", "description": "This RegEx will help to validate a physical file path with a specific file extension (here xls)", "matches": "E:\\DyAGT\\SD01A_specV2.xls", "non_matches": "E:\\DyAGT\\SD01A_specV2.txt"}, {"id": 93, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=102", "expression": "^(20|21|22|23|[0-1]\\d)[0-5]\\d$", "description": "This regular expression will match a 24 hour time with no separators.", "matches": "1200 | 1645 | 2359", "non_matches": "2400 | asbc | 12:45"}, {"id": 94, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=103", "expression": "^( [1-9]|[1-9]|0[1-9]|10|11|12)[0-5]\\d$", "description": "Matches a 12-hour time value expressed as either 4 numeric digits, 3 numeric digits, or a space and 3 numeric digits. 3 digit times (930) can be expressed with leading 0's (0930) or not. AM/PM designation is not included in this expression.", "matches": "1145 | 933 | 801", "non_matches": "0000 | 1330 | 8:30"}, {"id": 95, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=104", "expression": "^\\d{1,2}\\/\\d{2,4}$", "description": "Accepts 1-2 digits followed by a slash followed by 2-4 digits. Useful for numeric month/year entry.", "matches": "9/02 | 09/2002 | 09/02", "non_matches": "Fall 2002 | Sept 2002"}, {"id": 96, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=105", "expression": "^(|(0[1-9])|(1[0-2]))\\/((0[1-9])|(1\\d)|(2\\d)|(3[0-1]))\\/((\\d{4}))$", "description": "This expression matches dates formatted as MM/DD/YYYY where months and days must be 2 digits each, zero padded. It is not perfect - it allows DD to be from 01 to 31 regardless of the month.", "matches": "01/01/2001 | 02/30/2001 | 12/31/2002", "non_matches": "1/1/02 | 1/1/2002 | 1/25/2002"}, {"id": 97, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=106", "expression": "^((((0[13578])|(1[02]))[\\/]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\\/]?(([0-2][0-9])|(30)))|(02[\\/]?[0-2][0-9]))[\\/]?\\d{4}$", "description": "Date expressions that matches MM/DD/YYYY where MM and DD must be two digits and zero padded. Validates correctly for all months except February, which it assumes to always have 29 days. The "/" separator is optional.", "matches": "01/01/2001 | 02/29/2002 | 12/31/2002", "non_matches": "1/1/02 | 02/30/2002 | 1/25/2002"}, {"id": 98, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=107", "expression": "^(\\d{1,3}'(\\d{3}')*\\d{3}(\\.\\d{1,3})?|\\d{1,3}(\\.\\d{3})?)$", "description": "This regex match numeric data in the following format: thousands are separated by (') apostrophe, decimal places are separated by dot (.) Maximum three decimal places are not required. It's easy to change to other separators as well.", "matches": "1'235.140 | 1'222'333.120 | 456", "non_matches": "1234.500 | 78'45.123 | 123,0012"}, {"id": 99, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=108", "expression": "^((0?[1-9]|[12][1-9]|3[01])\\.(0?[13578]|1[02])\\.20[0-9]{2}|(0?[1-9]|[12][1-9]|30)\\.(0?[13456789]|1[012])\\.20[0-9]{2}|(0?[1-9]|1[1-9]|2[0-8])\\.(0?[123456789]|1[012])\\.20[0-9]{2}|(0?[1-9]|[12][1-9])\\.(0?[123456789]|1[012])\\.20(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))$", "description": "Fully functional date validator in format dd.MM.yyyy\nWorks only within range of years 2000-2099 !\nIt allows leading zeros but does not require them. The last year pattern (enumeration) is not very clever but I will improve it, if needed.", "matches": "31.01.2002 | 29.2.2004 | 09.02.2005", "non_matches": "31.11.2002 | 29.2.2002 | 33.06.2000"}, {"id": 100, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=109", "expression": "^(0[1-9]|1[0-2])\\/((0[1-9]|2\\d)|3[0-1])\\/(19\\d\\d|200[0-3])$", "description": "This expression is an attempt to match the most obvious features of a valid date in American/US format of the form mm/dd/yyyy for any year 1900 through 2003. It can easily be adapted for different date ranges. It matches any date where the day part is any number 01-31, the month part is any number 01-12, and the year part is any number 1900-2003. The only invalid dates that it matches are ones where the day part may be in the range 01-31 but that range might not be valid for the specified month. An example of an invalid date that it would allow to pass through would be 11/31/2002. This date is invalid because 11/31 of any year does not exist, but this expression would allow it pass through since the day part is in the range 01-31.\nThis regular expression has been used successfully in ASP with VBScript using the windows scripting library RegExp object.", "matches": "12/31/2003 | 01/01/1900 | 11/31/2002", "non_matches": "1/1/2002 | 01/01/02 | 01/01/2004"}, {"id": 101, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=110", "expression": "^((((([13578])|(1[0-2]))[\\-\\/\\s]?(([1-9])|([1-2][0-9])|(3[01])))|((([469])|(11))[\\-\\/\\s]?(([1-9])|([1-2][0-9])|(30)))|(2[\\-\\/\\s]?(([1-9])|([1-2][0-9]))))[\\-\\/\\s]?\\d{4})(\\s((([1-9])|(1[02]))\\:([0-5][0-9])((\\s)|(\\:([0-5][0-9])\\s))([AM|PM|am|pm]{2,2})))?$", "description": "This expression can be used validate a datetime column from SQL Server. Big parts of it where taken from other samples on RegexLib. Please feel free to take it apart and improve it.", "matches": "3/3/2003 | 3/3/2002 3:33 pm | 3/3/2003 3:33:33 am", "non_matches": "13/1/2002 | 3/3/2002 3:33 | 31/3/2002"}, {"id": 102, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=111", "expression": "^\\d{3}\\s?\\d{3}$", "description": "This can be used to match indian style pincodes / postal codes used by the indian postal departments which are 6 digits long and may have space after the 3rd digit", "matches": "400 099 | 400099 | 400050", "non_matches": "2345678 | 12345 | asdf"}, {"id": 103, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=112", "expression": "^((((0[13578])|([13578])|(1[02]))[\\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\\/](([1-9])|([0-2][0-9]))))[\\/]\\d{4}$|^\\d{4}$", "description": "The following validates dates with and without leading zeros in the following formats: MM/DD/YYYY and it also takes YYYY (this can easily be removed). All months are validated for the correct number of days for that particular month except for February which can be set to 29 days. date day month year", "matches": "01/01/2001 | 1/01/2001 | 2002", "non_matches": "2/30/2002 | 13/23/2002 | 12345"}, {"id": 104, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=113", "expression": "^(?:(?:(?:0?[13578]|1[02])(\\/|-|\\.)31)\\1|(?:(?:0?[13-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})$", "description": "This expression validates dates in the US m/d/y format from 1/1/1600 - 12/31/9999.", "matches": "01.1.02 | 11-30-2001 | 2/29/2000", "non_matches": "02/29/01 | 13/01/2002 | 11/00/02"}, {"id": 105, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=114", "expression": "(((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}))|((2)([-./])(0[1-9]|1[0-9]|2[0-8])([-./])(\\d{4}))|((2)(\\.|-|\\/)(29)([-./])([02468][048]00))|((2)([-./])(29)([-./])([13579][26]00))|((2)([-./])(29)([-./])([0-9][0-9][0][48]))|((2)([-./])(29)([-./])([0-9][0-9][2468][048]))|((2)([-./])(29)([-./])([0-9][0-9][13579][26])))", "description": "My meager attempt at a date validator with leap years using a strict mm/dd/yyyy format.", "matches": "02/29/2084 | 01/31/2000 | 11/30/2000", "non_matches": "02/29/2083 | 11/31/2000 | 01/32/2000"}, {"id": 106, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=115", "expression": "^(?=[^&])(?:(?[^:/?#]+):)?(?://(?[^/?#]*))?(?[^?#]*)(?:\\?(?[^#]*))?(?:#(?.*))?", "description": "Use it for breaking-down a URI (URL, URN) reference into its main components: Scheme, Authority, Path, Query and Fragment.\nThis is not a simple match regular expression. so it not works to verify a URI. It returns 1 matching group for each URI component.\nFor example, for the following URI:\nhttp://regexlib.com/REDetails.aspx?regexp_id=x#Details\nreturns: scheme="http", authority="regexlib.com", path="/REDetails.aspx", query="regexp_id=x" and fragment="Details".\nThis is a W3C raccomandation (RFC 2396).", "matches": "http://regexlib.com/REDetails.aspx?regexp_id=x#Details", "non_matches": "&"}, {"id": 107, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=116", "expression": "^[\\\\(]{0,1}([0-9]){3}[\\\\)]{0,1}[ ]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}[ ]*((x){0,1}([0-9]){1,5}){0,1}$", "description": "US Telephone Number where this is regular expression excludes the first number, after the area code,from being 0 or 1; it also allows an extension\nto be added where it does not have to be prefixed by 'x'.", "matches": "(910)456-7890 | (910)456-8970 x12 | (910)456-8970 1211", "non_matches": "(910) 156-7890 | (910) 056-7890 | (910) 556-7890 x"}, {"id": 108, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=117", "expression": "^[-+]?\\d+(\\.\\d+)?$", "description": "This matches any real number, with optional decimal point and numbers after the decimal, and optional positive (+) or negative (-) designation.", "matches": "123 | -123.45 | +123.56", "non_matches": "123x | .123 | -123."}, {"id": 109, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=118", "expression": "^[a-zA-Z][0-9][a-zA-Z]\\s?[0-9][a-zA-Z][0-9]$", "description": "Match Canadia Zip Code. You can have a space in the middle Like T2P 3C7, or no space like T2P3C7", "matches": "T2p 3c7 | T3P3c7 | T2P 3C7", "non_matches": "123456 | 3C7T2P | 11T21RWW"}, {"id": 110, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=122", "expression": "^((\\d{5}-\\d{4})|(\\d{5})|([A-Z]\\d[A-Z]\\s\\d[A-Z]\\d))$", "description": "This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.", "matches": "44240 | 44240-5555 | T2P 3C7", "non_matches": "44240ddd | t44240-55 | t2p3c7"}, {"id": 111, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=123", "expression": "(a|b|c).(a.b)*.b+.c", "description": "", "matches": "autbfc", "non_matches": "attc"}, {"id": 112, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=124", "expression": "\"((\\\\\")|[^\"(\\\\\")])+\"", "description": "Matches quoted string, using \\" as an escape to place quotes in the string", "matches": "\"test\" | \"escape\\\"quote\" | \"\\\"\"", "non_matches": "test | \"test | \"test\\\""}, {"id": 113, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=125", "expression": "^\\d{5}(-\\d{3})?$", "description": "Matches standard 5 digit Brazilian Postal Codes (CEP), or the CEP + 3 digits (distribution identifiers - suffix).\nFor more info refer to: http://www.correios.com.br/servicos/cep/Estrutura_CEP.cfm (in portuguese).", "matches": "13165-000 | 38175-000 | 81470-276", "non_matches": "13165-00 | 38175-abc | 81470-2763"}, {"id": 114, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=126", "expression": "^\\$(\\d{1,3}(\\,\\d{3})*|(\\d+))(\\.\\d{2})?$", "description": "This re matches US currency format with lead dollar sign. Dollar value must have at least one digit and may or may not be comma separated. Cents value is optional.", "matches": "$0.84 | $123458 | $1,234,567.89", "non_matches": "$12,3456.01 | 12345 | $1.234"}, {"id": 115, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=127", "expression": "([A-Z]:\\\\[^/:\\*\\?<>\\|]+\\.\\w{2,6})|(\\\\{2}[^/:\\*\\?<>\\|]+\\.\\w{2,6})", "description": "This regular expression pattern can be used to check the validity of paths for file upload controls. The uploaded file can be either stored locally or accessible through UNC. It cannot contain illegal characters for the windows OS - that may be supported e.g. on Mac OS \u2013 and cannot be a URL (Yes, as weird as it may seem, some users enter URLs in the file upload box, even though there is a browse button...)", "matches": "C:\\temp\\this allows spaces\\web.config | \\\\Andromeda\\share\\file name.123", "non_matches": "tz:\\temp\\ fi*le?na:m.doc | \\\\Andromeda\\share\\filename.a"}, {"id": 116, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=128", "expression": "^(?i:(?=[MDCLXVI])((M{0,3})((C[DM])|(D?C{0,3}))?((X[LC])|(L?XX{0,2})|L)?((I[VX])|(V?(II{0,2}))|V)?))$", "description": "This RE validates alpha characters that evaluate to Roman numerials, ranging from 1(I) - 3999(MMMCMXCIX). Not case sensitive.", "matches": "III | xiv | MCMXCIX", "non_matches": "iiV | MCCM | XXXX"}, {"id": 117, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=129", "expression": "(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])$)|(^([0-9]|[1][0-9]|[2][0-3])$)", "description": "Matches a string if it is a valid time in the format of HH:MM / H:MM / HH / H", "matches": "10:35 | 9:20 | 23", "non_matches": "24:00 | 20 PM | 20:15 PM"}, {"id": 118, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=130", "expression": "^\\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(\\.[0-9][0-9])?$", "description": "Matches US currency input with or without commas. This provides a fix for the currency regular expression posted at http://regxlib.com/REDetails.aspx?regexp_id=70 by escaping the . (period) to ensure that no other characters may be used in it's place.", "matches": "$3,023,123.34 | 9,876,453 | 123456.78", "non_matches": "4,33,234.34 | $1.234 | abc"}, {"id": 119, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=131", "expression": "^\\$?\\d+(\\.(\\d{2}))?$", "description": "To evaluate an amount with or without a dollar sign where the cents are optional.", "matches": "$2.43 | 2.02 | $2112", "non_matches": "2.1 | $.14 | $2,222.12"}, {"id": 120, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=132", "expression": "((0[1-9])|(1[02]))/\\d{2}", "description": "Fromat check for MM/YY, checks month is 1-12 and any 2 digit year.", "matches": "01/00 | 12/99", "non_matches": "13/00 | 12/AS"}, {"id": 121, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=133", "expression": "(\"[^\"]*\")|('[^\\r]*)(\\r\\n)?", "description": "Will match a VBScript string and/or comment\nEx:\n' userinfo\nstrUsername = "tomsve"\niAge = 20\n' temp\nstrPassword = "halloj"\n...Would result in the following matches:\n' userinfo\n"tomsve"\n' temp\n"halloj"\nGood luck!\nTom S. [email\u00a0protected]", "matches": "\"my string\" | \"a string with ' in it\" | ' comment", "non_matches": "asd \""}, {"id": 122, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=134", "expression": "^[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}$", "description": "GUID Tester.\nThis is a modification from the regular expression submitted by James Bray ([email\u00a0protected]). It allows the use of mixed upper and lowercase letters in the GUID string.", "matches": "BFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4d31-3e35-4dab-afca-5e6e5c8f61ea", "non_matches": "qqqBFDB4D31-3E35-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E-4DAB-AFCA-5E6E5C8F61EA | BFDB4D31-3E35-4DAB-AF"}, {"id": 123, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=135", "expression": "^([0-9]{2})?(\\([0-9]{2})\\)([0-9]{3}|[0-9]{4})-[0-9]{4}$", "description": "A simple expression to brazilian phone number code, with international code.\nSimple DDI without "+" 99 plus simple DDD (99) plus simple local phone number 3 or 4 digits plus "-" plus 4 digits.", "matches": "55(21)123-4567 | (11)1234-5678 | 55(71)4562-2234", "non_matches": "3434-3432 | 4(23)232-3232 | 55(2)232-232"}, {"id": 124, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=136", "expression": "^\\d{2}(\\x2e)(\\d{3})(-\\d{3})?$", "description": "Other expression to standard 5 digit Brazilian Postal Codes (CEP), or the CEP + 3 digits (distribution identifiers - suffix).\nThe diference of the original one, is that the "." is mandatory.", "matches": "12.345-678 | 23.345-123 | 99.999", "non_matches": "41222-222 | 3.444-233 | 43.324444"}, {"id": 125, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=137", "expression": "^(([a-zA-Z]:)|(\\\\{2}\\w+)\\$?)(\\\\(\\w[\\w ]*))+\\.(txt|TXT)$", "description": "This RE validates a path/file of type txt (text file)\nThis RE can be used as a filter on certain file types, while insuring the entire string is a fully qualified path and file. The filter value can be changed or added to as you need", "matches": "c:\\file.txt | c:\\folder\\sub folder\\file.txt | \\\\network\\folder\\file.txt", "non_matches": "C: | C:\\file.xls | folder.txt"}, {"id": 126, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=138", "expression": "^[a-zA-Z0-9]+([a-zA-Z0-9\\-\\.]+)?\\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$", "description": "Checks domain names. This is an attempt to deal with some of the issues of the other reg ex in not handling leading periods(.) and hypens(-).", "matches": "my.domain.com | regexlib.com | big-reg.com", "non_matches": ".mydomain.com | regexlib.comm | -bigreg.com"}, {"id": 127, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=139", "expression": "^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$", "description": "This matches floating point expression in a more rigorous way - accepts both exponent as well as non exponent notations.", "matches": "123 | -123.35 | -123.35e-2", "non_matches": "abc | 123.32e | 123.32.3"}, {"id": 128, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=140", "expression": "^[_a-zA-Z0-9-]+(\\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$", "description": "Matches e-mail addresses, including some of the newer top-level-domain extensions, such as info, museum, name, etc. Also allows for emails tied directly to IP addresses.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "broken@@example.com | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 129, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=141", "expression": "(^0[78][2347][0-9]{7})", "description": "checks for valid South African cellular numbers", "matches": "0834128458 | 0749526308", "non_matches": "0861212308 | 0892549851"}, {"id": 130, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=142", "expression": "(^\\(\\)$|^\\(((\\([0-9]+,(\\((\\([0-9]+,[0-9]+,[0-9]+\\),)*(\\([0-9]+,[0-9]+,[0-9]+\\)){1}\\))+\\),)*(\\([0-9]+,(\\((\\([0-9]+,[0-9]+,[0-9]+\\),)*(\\([0-9]+,[0-9]+,[0-9]+\\)){1}\\))+\\)){1}\\)))$", "description": "This checks for the specific syntax ((A,((b,c,d),(e,f,g))), ..). No limit on number of occurances.", "matches": "((24,((1,2,3),(3,4,5)))) | ((1,((2,3,4),(4,5,6),(96,34,26))),(12,((1,3,4),(4,5,6),(7,8,9)))) | ()", "non_matches": "(24,((1,2,3),(3,4,5))) | ( ) | ((23,(12,3,4),(4,5,6)))"}, {"id": 131, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=143", "expression": "^[a-zA-Z]+(([\\'\\,\\.\\- ][a-zA-Z ])?[a-zA-Z]*)*$", "description": "Person's name (first, last, or both) in any letter case. Although not perfect, this expression will filter out many incorrect name formats (especially numerics and invalid special characters).", "matches": "T.F. Johnson | John O'Neil | Mary-Kate Johnson", "non_matches": "sam_johnson | Joe--Bob Jones | dfjsd0rd"}, {"id": 132, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=144", "expression": "^((([0]?[1-9]|1[0-2])(:|\\.)[0-5][0-9]((:|\\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\\.)[0-5][0-9]((:|\\.)[0-5][0-9])?))$", "description": "Matches times seperated by either : or . will match a 24 hour time, or a 12 hour time with AM or PM specified. Allows 0-59 minutes, and 0-59 seconds. Seconds are not required.", "matches": "1:01 AM | 23:52:01 | 03.24.36 AM", "non_matches": "19:31 AM | 9:9 PM | 25:60:61"}, {"id": 133, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=145", "expression": "^[a-zA-Z0-9\\s.\\-_']+$", "description": "Alphanumeric, hyphen apostrophe, comma dash spaces", "matches": "dony d'gsa", "non_matches": "^[a-zA-Z0-9\\s.\\-_']+$"}, {"id": 134, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=146", "expression": "^(http|https|ftp)\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\\\+&%\\$#\\=~])*$", "description": "Modified URL RegExp that requires (http, https, ftp)://, A nice domain, and a decent file/folder string. Allows : after domain name, and these characters in the file/folder sring (letter, numbers, - . _ ? , ' / \\ + & % $ # = ~). Blocks all other special characters-good for protecting against user input!", "matches": "http://www.blah.com/~joe | ftp://ftp.blah.co.uk:2828/blah%20blah.gif | https://blah.gov/blah-blah.as", "non_matches": "www.blah.com | http://www.blah"blah.com/I have spaces! | ftp://blah_underscore/[nope]"}, {"id": 135, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=147", "expression": "^([A-HJ-TP-Z]{1}\\d{4}[A-Z]{3}|[a-z]{1}\\d{4}[a-hj-tp-z]{3})$", "description": "Codigos Postales Argentinos (CPA)\nThis expression defines the new zip code format for Argentina.", "matches": "C1406HHA | A4126AAB | c1406hha", "non_matches": "c1406HHA | 4126 | C1406hha"}, {"id": 136, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=148", "expression": "^(((25[0-5]|2[0-4][0-9]|19[0-1]|19[3-9]|18[0-9]|17[0-1]|17[3-9]|1[3-6][0-9]|12[8-9]|12[0-6]|1[0-1][0-9]|1[1-9]|[2-9][0-9]|[0-9])\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))|(192\\.(25[0-5]|2[0-4][0-9]|16[0-7]|169|1[0-5][0-9]|1[7-9][0-9]|[1-9][0-9]|[0-9]))|(172\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|1[0-5]|3[2-9]|[4-9][0-9]|[0-9])))\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$", "description": "Updated to exclude 127/8", "matches": "66.129.71.120 | 207.46.230.218 | 64.58.76.225", "non_matches": "127.0.0.1 | 192.168.0.1 | my ip address"}, {"id": 137, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=149", "expression": "[^A-Za-z0-9_@\\.]|@{2,}|\\.{5,}", "description": "Used as a username validation script requires:\n1. Allows All Alphanumeric characters & underscore\n2. Allows One "@" character\n3. Allows Five "." periods\n4. Rejects spaces", "matches": "user name | user#name | .....", "non_matches": "User_Name1 | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 138, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=151", "expression": "^(?:(?:31(\\/|-|\\.)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\\/|-|\\.)(?:0?[1,3-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\\/|-|\\.)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\\/|-|\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$", "description": "This expression validates dates in the ITALIAN d/m/y format from 1/1/1600 - 31/12/9999. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999, and all 2 digits years except 00 since it could be any century (1900, 2000, 2100). Days and months must be 1 or 2 digits and may have leading zeros. Years must be 2 or 4 digit years. 4 digit years must be between 1600 and 9999. Date separator may be a slash (/), dash (-), or period (.)\nThanks to Michael Ash for US Version", "matches": "29/02/1972 | 5-9-98 | 10-11-2002", "non_matches": "29/02/2003 | 12/13/2002 | 1-1-1500"}, {"id": 139, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=152", "expression": "^\\d{0,2}(\\.\\d{1,2})?$", "description": "This regular expression validates that the data entered is a number with a maximum of two integers and two decimals and a minimum of one integer or one decimal.", "matches": "99.99 | 99 | .99", "non_matches": "999.999 | 999 | .999"}, {"id": 140, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=153", "expression": "^(http|https|ftp)\\://[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\\\+&%\\$#\\=~])*[^\\.\\,\\)\\(\\s]$", "description": "This Regex (can be used e.g. in PHP with eregi) will match any valid URL. Unlike the other exapmles here, it will NOT match a valid URL ending with a dot or bracket. This is important if you use this regex to find and "activate" Links in an Text", "matches": "https://www.restrictd.com/~myhome/", "non_matches": "http://www.krumedia.com. | (http://www.krumedia.com) | http://www.krumedia.com,"}, {"id": 141, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=154", "expression": "^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$", "description": "This will grep for a valid MAC address , with colons seperating octets. It will ignore strings too short or long, or with invalid characters. It will accept mixed case hexadecimal. Use extended grep.", "matches": "01:23:45:67:89:ab | 01:23:45:67:89:AB | fE:dC:bA:98:76:54", "non_matches": "01:23:45:67:89:ab:cd | 01:23:45:67:89:Az | 01:23:45:56:"}, {"id": 142, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=155", "expression": "^100$|^[0-9]{1,2}$|^[0-9]{1,2}\\,[0-9]{1,3}$", "description": "Percentage with 3 number after comma.", "matches": "12,654 | 1,987", "non_matches": "128,2 | 12,"}, {"id": 143, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=156", "expression": "^(([0-2]\\d|[3][0-1])\\/([0]\\d|[1][0-2])\\/[2][0]\\d{2})$|^(([0-2]\\d|[3][0-1])\\/([0]\\d|[1][0-2])\\/[2][0]\\d{2}\\s([0-1]\\d|[2][0-3])\\:[0-5]\\d\\:[0-5]\\d)$", "description": "Correct French DateTime(DD/MM/YYYY OR DD/MM/YYYY HH:MM:SS)", "matches": "12/01/2002 | 12/01/2002 12:32:10", "non_matches": "32/12/2002 | 12/13/2001 | 12/02/06"}, {"id": 144, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=157", "expression": "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{4,8}$", "description": "Password expresion that requires one lower case letter, one upper case letter, one digit, 6-13 length, and no spaces. This is merely an extension of a previously posted expression by Steven Smith ([email\u00a0protected]) . The no spaces is new.", "matches": "1agdA*$# | 1agdA*$# | 1agdA*$#", "non_matches": "wyrn%@*&$# f | mbndkfh782 | BNfhjdhfjd&*)%#$)"}, {"id": 145, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=158", "expression": "^([a-zA-Z0-9][-a-zA-Z0-9]*[a-zA-Z0-9]\\.)+([a-zA-Z0-9]{3,5})$", "description": "Host/Domain name validation for perl.\nShould be combined with a check for\nlength <= 63 characters and that $2\nis in a list of top-level domains.", "matches": "freshmeat.net | 123.com | TempLate-toolkKt.orG", "non_matches": "-dog.com | ?boy.net | this.domain"}, {"id": 146, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=159", "expression": "^[^']*$", "description": "This one matches all strings that do not contain the single quotation mark (').", "matches": "asljas | %/&89uhuhadjkh | "hi there!"", "non_matches": "'hi there!' | It's 9 o'clock | '''''"}, {"id": 147, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=160", "expression": "^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])$", "description": "This validates a number between 1 and 255. Could be modified to IP, or just to verify a number in a range.", "matches": "1 | 108 | 255", "non_matches": "01 | 256"}, {"id": 148, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=161", "expression": "^((https?|ftp)\\://((\\[?(\\d{1,3}\\.){3}\\d{1,3}\\]?)|(([-a-zA-Z0-9]+\\.)+[a-zA-Z]{2,4}))(\\:\\d+)?(/[-a-zA-Z0-9._?,'+&%$#=~\\\\]+)*/?)$", "description": "Using other regular experssions from this page, combining others for email addresses, and mixing in my own ideas - I came up with this regular expression. Can be used to validate input into a database.", "matches": "http://207.68.172.254/home.ashx | ftp://ftp.netscape.com/ | https://www.brinkster.com/login.asp", "non_matches": "htp://mistake.com/ | http://www_address.com/ | ftp://www.files.com/file with spaces.txt"}, {"id": 149, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=162", "expression": "^[0-9](\\.[0-9]+)?$", "description": "matches non-negative decimal floating points numbers less than 10", "matches": "1.2345 | 0.00001 | 7", "non_matches": "12.2 | 1.10.1 | 15.98"}, {"id": 150, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=163", "expression": "(\\d{1,3},(\\d{3},)*\\d{3}(\\.\\d{1,3})?|\\d{1,3}(\\.\\d{3})?)$", "description": "Dollar Amount", "matches": "2&651.50 | 987.895", "non_matches": "25$%787*"}, {"id": 151, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=164", "expression": "\\$[0-9]?[0-9]?[0-9]?((\\,[0-9][0-9][0-9])*)?(\\.[0-9][0-9]?)?$", "description": "", "matches": "$1,456,983.00 | $1,700.07 | $68,944.23", "non_matches": "$20,86.93 | $1098.84 | $150."}, {"id": 152, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=165", "expression": "\\$[0-9]?[0-9]?[0-9]?((\\,[0-9][0-9][0-9])*)?(\\.[0-9][0-9])?$", "description": "", "matches": "$28,009,987.88 | $23,099.05 | $.88", "non_matches": "$234,5.99"}, {"id": 153, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=166", "expression": "^((((31\\/(0?[13578]|1[02]))|((29|30)\\/(0?[1,3-9]|1[0-2])))\\/(1[6-9]|[2-9]\\d)?\\d{2})|(29\\/0?2\\/(((1[6-9]|[2-9]\\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))|(0?[1-9]|1\\d|2[0-8])\\/((0?[1-9])|(1[0-2]))\\/((1[6-9]|[2-9]\\d)?\\d{2})) (20|21|22|23|[0-1]?\\d):[0-5]?\\d:[0-5]?\\d$", "description": "this expression validates a date-time field in European d/m/y h:m:s format. It is a european variation of Michael Ash's date-validation expression in this library.\nThe days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999, and all 2 digits years except 00", "matches": "29/02/2004 20:15:27 | 29/2/04 8:9:5 | 31/3/2004 9:20:17", "non_matches": "29/02/2003 20:15:15 | 2/29/04 20:15:15 | 31/3/4 9:20:17"}, {"id": 154, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=167", "expression": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", "description": "Easy expression that checks for valid email addresses.", "matches": "[email\u00a0protected] | [email\u00a0protected] | username-something@some-server.", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]_eo"}, {"id": 155, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=172", "expression": "(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\\s{0,1})(AM|PM|am|pm|aM|Am|pM|Pm{2,2})$)", "description": "Validate \u201cTime\u201d Data to Work with SQL Server\nThis is a fix (I hope) for a problem with the original expression. It originally allowed any combination of am or pm. For example: ma, aa, mm, mp, etc.", "matches": "8am | 8 am | 8:00 am", "non_matches": "8a | 8 a | 8:00 a"}, {"id": 156, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=173", "expression": "(?!^0*$)(?!^0*\\.0*$)^\\d{1,5}(\\.\\d{1,3})?$", "description": "This regular expression validates a number NOT 0, with no more than 5 places ahead and 3 places behind the decimal point.", "matches": "1 | 12345.123 | 0.5", "non_matches": "0 | 0.0 | 123456.1234"}, {"id": 157, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=174", "expression": "^.+@[^\\.].*\\.[a-z]{2,}$", "description": "Most email validation regexps are outdated and ignore the fact that domain names can contain any foreign character these days, as well as the fact that anything before @ is acceptable. The only roman alphabet restriction is in the TLD, which for a long time has been more than 2 or 3 chars (.museum, .aero, .info). The only dot restriction is that . cannot be placed directly after @.\nThis pattern captures any valid, reallife email adress.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 158, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=175", "expression": "@{2}((\\S)+)@{2}", "description": "This will match results in a template situation. For example:\ntemplate reads\nDear @@Name@@,\n....\nwould become\nDear John,\nIf you dont want to use the @@ change the @ to what ever characters you want.", "matches": "@@test@@ | @@name@@ | @@2342@@", "non_matches": "@test@ | @@na me@@ | @@ name@@"}, {"id": 159, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=176", "expression": "([0-1][0-9]|2[0-3]):[0-5][0-9]", "description": "Validate an hour entry to be between 00:00 and 23:59", "matches": "00:00 | 13:59 | 23:59", "non_matches": "24:00 | 23:60"}, {"id": 160, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=182", "expression": "<[^>\\s]*\\bauthor\\b[^>]*>", "description": "This expression will match the corresponding XML/HTML elements opening and closing tags. Useful to handle documents fragments, without loading an XML DOM.", "matches": "<author name="Daniel"> | </sch:author> | <pp:author name="Daniel"", "non_matches": "<other> | </authors> | <work>author</work>"}, {"id": 161, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=184", "expression": "[A-Z][a-z]+", "description": "This expression was developed to match the Title cased words within a Camel cased variable name. So it will match 'First' and 'Name' within 'strFirstName'.", "matches": "strFirstName | intAgeInYears | Where the Wild Things Are", "non_matches": "123 | abc | this has no caps in it"}, {"id": 162, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=185", "expression": "^[+-]?([0-9]*\\.?[0-9]+|[0-9]+\\.?[0-9]*)([eE][+-]?[0-9]+)?$", "description": "A regular expression that matches numbers. Integers or decimal numbers with or without the exponential form.", "matches": "23 | -17.e23 | +.23e+2", "non_matches": "+.e2 | 23.17.5 | 10e2.0"}, {"id": 163, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=186", "expression": "^([1-zA-Z0-1@.\\s]{1,255})$", "description": "A general string validation to insure no malicious code is being passed through user input. General enough too allow email address, names, address, passwords, so on. Disallows \u2018,\\*&$<> or other characters that could cause issues.", "matches": "[email\u00a0protected] | My Name | asdf12df", "non_matches": "\u2018,\\*&$<> | 1001' string"}, {"id": 164, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=187", "expression": "^(\\d{5}-\\d{4}|\\d{5})$", "description": "this works with ASP.net regular expression valiadtors, ecma script compliant", "matches": "12345 | 12345-1234", "non_matches": "12345-12345 | 123 | 12345-abcd"}, {"id": 165, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=188", "expression": "(^\\d{5}-\\d{3}|^\\d{2}.\\d{3}-\\d{3}|\\d{8})", "description": "Validar o do CEP Brasileiro com 8 posicoes podendo usar\nmascara . e - ou somente numeros", "matches": "12.345-678 | 12345-678 | 12345678", "non_matches": "12.345678 | 12345-1 | 123"}, {"id": 166, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=190", "expression": "^(?:(?:(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(\\/|-|\\.)(?:0?2\\1(?:29)))|(?:(?:(?:1[6-9]|[2-9]\\d)?\\d{2})(\\/|-|\\.)(?:(?:(?:0?[13578]|1[02])\\2(?:31))|(?:(?:0?[1,3-9]|1[0-2])\\2(29|30))|(?:(?:0?[1-9])|(?:1[0-2]))\\2(?:0?[1-9]|1\\d|2[0-8]))))$", "description": "This expression validates dates in the y/m/d format from 1600/1/1 - 9999/12/31. Follows the same validation rules for dates as my other date validator (m/d/y format) located in this library.", "matches": "04/2/29 | 2002-4-30 | 02.10.31", "non_matches": "2003/2/29 | 02.4.31 | 00/00/00"}, {"id": 167, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=191", "expression": "^([a-zA-Z]\\:|\\\\)\\\\([^\\\\]+\\\\)*[^\\/:*?\"<>|]+\\.htm(l)?$", "description": "Validates a file path on your local drive or a network drive. A similar one was written by Vinod Kumar but it does not reject asterisks in the path. Moreover, his did not work with RegularExpressionValidators. This one does.", "matches": "x:\\test\\testing.htm | x:\\test\\test#$ ing.html | \\\\test\\testing.html", "non_matches": "x:\\test\\test/ing.htm | x:\\test\\test*.htm | \\\\test?<.htm"}, {"id": 168, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=192", "expression": "^[\\w-]+(?:\\.[\\w-]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7}$", "description": "Matches 99.99% of e-mail addresses (excludes IP e-mails, which are rarely used). The {2,7} at the end leaves space for top level domains as short as .ca but leaves room for new ones like .museum, etc. The ?: notation is a perl non-capturing notation, and can be removed safely for non-perl-compatible languages. See also email.", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected]"}, {"id": 169, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=193", "expression": "([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", "description": "Checks for Date in the typical MySQL DB Format. Not mutch but simple to for converting to German date format:\n$date = "2003-12-03";\nif (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs))\n{\necho "$regs[3].$regs[2].$regs[1]"; // prints 03.12.2003\n}", "matches": "2002-11-03 | 2007-17-08 | 9999-99-99", "non_matches": "2002/17/18 | 2002.18.45 | 18.45.2002"}, {"id": 170, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=194", "expression": "^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$", "description": "This matches an IP address, putting each number in its own group that can be retrieved by number. If you do not care about capturing the numbers, then you can make this shorter by putting everything after ^ until immediately after the first \\. in a group ( ) with a {3} after it. Then put the number matching regex in once more.\nIt only permits numbers in the range 0-255.", "matches": "0.0.0.0 | 255.255.255.02 | 192.168.0.136", "non_matches": "256.1.3.4 | 023.44.33.22 | 10.57.98.23."}, {"id": 171, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=195", "expression": "^\\$?(\\d{1,3}(\\,\\d{3})*|(\\d+))(\\.\\d{0,2})?$", "description": "From Author: DON'T USE THIS ONE. FIND MY OTHER ONE THAT BLOCKS LEADING ZEROS. My site also couldn't swallow the \\d, so I switched to numeric ranges and it worked fine.\nKEYWORDS Currency Money Dollar", "matches": "$0,234.50 | 0234.5 | 0,234.", "non_matches": "$1,23,50 | $123.123"}, {"id": 172, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=196", "expression": "^\\$?([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$", "description": "Many currency expresssions allow leading zeros, thus $01.40 passes thru them. This expression kills them, except for 0 in the one's column. Works with or without commas and/or dollar sign. Decimals not mandatory, unless no zero in ones column and decimal point is placed. Allows $0.00 and .0 Keywords: money dollar currency", "matches": "$1,234.50 | $0.70 | .7", "non_matches": "$0,123.50 | $00.5"}, {"id": 173, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=197", "expression": "^(((((0[1-9])|(1\\d)|(2[0-8]))-((0[1-9])|(1[0-2])))|((31-((0[13578])|(1[02])))|((29|30)-((0[1,3-9])|(1[0-2])))))-((20[0-9][0-9]))|(29-02-20(([02468][048])|([13579][26]))))$", "description": "This expression validates a date field in the European DD-MM-YYYY format. Days are validate for the given month and year.", "matches": "05-01-2002 | 29-02-2004 | 31-12-2002", "non_matches": "1-1-02 | 29-02-2002 | 31-11-2002"}, {"id": 174, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=198", "expression": "^\\d*[0-9](|.\\d*[0-9]|,\\d*[0-9])?$", "description": "This is permit all decimal number, exclude all alphanumeric caracter", "matches": "123456.123456 | 123456,123456 | 123456", "non_matches": "123a.123 | 123a,123 | a"}, {"id": 175, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=199", "expression": "^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$", "description": "Valida os todos Estados Brasileiros (UF)\ne o distrito Federal", "matches": "AC | RJ | SP", "non_matches": "XX | AB | HJ"}, {"id": 176, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=200", "expression": "^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}", "description": "Checks whether the string specified is in the same format as the UK postcode format defined on:\nhttp://www.magma.ca/~djcl/postcd.txt\nIt allows:\nA = Letter\nN = Number\nAN NAA, ANA NAA, ANN NAA, AAN NAA, AAA NAA (rare), AANN NAA, AANA NAA\nIt gives the option to have the two parts of the uk postcode to be separated by a space or a hyphen.\n(restriction is set to all-capitals)", "matches": "AA11 1AA | AA1A 1AA | A11-1AA", "non_matches": "111 AAA | 1AAA 1AA | A1AA 1AA"}, {"id": 177, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=201", "expression": "^[1-9]{1}[0-9]{3}$", "description": "Postcode for Belgium", "matches": "1234", "non_matches": "123 | 123A"}, {"id": 178, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=202", "expression": "^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$", "description": "Postcode for Germany", "matches": "A-1234 | A 1234 | A1234", "non_matches": "AA-1234 | A12345"}, {"id": 179, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=203", "expression": "^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$", "description": "Postcode check for France (including colonies)\n-----\nEdited; sorry I didn't know about Corsica, no offense :)", "matches": "12345 | F-12345 | F-2B100", "non_matches": "F12345 | F-123456 | 123456"}, {"id": 180, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=204", "expression": "^(V-|I-)?[0-9]{4}$", "description": "Postcode check for Italy (including possible Vatican/Italy indications)", "matches": "1234 | V-1234", "non_matches": "12345"}, {"id": 181, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=205", "expression": "^[1-9]{1}[0-9]{3} ?[A-Z]{2}$", "description": "Postcode check for Netherlands", "matches": "1234 AB | 1234AB", "non_matches": "123AB | 1234AAA"}, {"id": 182, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=206", "expression": "^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$", "description": "Postcode check for Spain", "matches": "12345 | 10234 | 01234", "non_matches": "00123"}, {"id": 183, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=208", "expression": "]*[^/])>", "description": "Use this along with this replacement string <img\\1 /> to convert image tags to XHTML compliant image tags.", "matches": "", "non_matches": ""}, {"id": 184, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=209", "expression": "^((0?[1-9])|((1|2)[0-9])|30|31)$", "description": "matches any day of\nmonth 0?1-31", "matches": "01 | 12 | 31", "non_matches": "123 | 32 | abc"}, {"id": 185, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=210", "expression": "<!--[\\s\\S]*?-->", "description": "Removes pesky comments and commented javascript from HTML", "matches": "<!-- comments --> | <!-- x = a > b - 3 -->", "non_matches": "<COMMENTS>this is a comment</COMMENTS>"}, {"id": 186, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=211", "expression": "</?(\\w+)(\\s+\\w+=(\\w+|"[^"]*"|'[^']*'))*>", "description": "Finds any HTML tag and sub-matches properties weather it has an apposterphee, quote, or no quote/apposterphee", "matches": "<TD> | <TD bgColor="FFFFFF"> | </TD>", "non_matches": "No Tag Here ..."}, {"id": 187, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=212", "expression": "^\\{?[a-fA-F\\d]{8}-([a-fA-F\\d]{4}-){3}[a-fA-F\\d]{12}\\}?$", "description": "Validates a GUID with and without brackets. 8,4,4,4,12 hex characters seperated by dashes.", "matches": "{e02ff0e4-00ad-090A-c030-0d00a0008ba0} | e02ff0e4-00ad-090A-c030-0d00a0008ba0", "non_matches": "0xe02ff0e400ad090Ac0300d00a0008ba0"}, {"id": 188, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=213", "expression": "^([a-zA-Z0-9@*#]{8,15})$", "description": "Password matching expression. Match all alphanumeric character and predefined wild characters. Password must consists of at least 8 characters and not more than 15 characters.", "matches": "@12X*567 | 1#Zv96g@*Yfasd4 | #67jhgt@erd", "non_matches": "$12X*567 | 1#Zv_96 | +678jhgt@erd"}, {"id": 189, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=214", "expression": "^0[23489]{1}(\\-)?[^0\\D]{1}\\d{6}$", "description": "Regular Expression that validate a phone number inside israel.", "matches": "03-6106666 | 036106666 | 02-5523344", "non_matches": "00-6106666 | 03-0106666 | 02-55812346"}, {"id": 190, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=215", "expression": "^0(5[012345678]|6[47]){1}(\\-)?[^0\\D]{1}\\d{5}$", "description": "Regular Expression that validate Cellular phone in israel.", "matches": "050-346634 | 058633633 | 064-228226", "non_matches": "059-336622 | 064-022663 | 0545454545"}, {"id": 191, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=216", "expression": "(\\d*)'*-*(\\d*)/*(\\d*)"", "description": "This regular expression is for parsing feet and inches measurements.", "matches": "5'-3/16" | 1'-2" | 5/16"", "non_matches": "1 3/16"}, {"id": 192, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=218", "expression": "^(/w|/W|[^<>+?$%{}&])+$", "description": "simple expression for excluding a given list of characters. simply change the contents of [^] to suite your needs. for example ^(/w|/W|[^<>])+$ would allow everything except the characters < and >.", "matches": "John Doe Sr. | 100 Elm St., Suite 25 | Valerie's Gift Shop", "non_matches": "
Hey
"}, {"id": 193, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=219", "expression": "(\\{\\\\f\\d*)\\\\([^;]+;)", "description": "This pattern returns the font section from an RTF document. The first parenthetical subexpression captures the font number, the second returns the actual font enumeration. Lame-o, but fun! :-)", "matches": "{\\f0\\Some Font names here; | {\\f1\\fswiss\\fcharset0\\fprq2{\\*\\panose 020b0604020202020204}Arial; | {\\f", "non_matches": "{f0fs20 some text}"}, {"id": 194, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=220", "expression": "</?([a-zA-Z][-A-Za-z\\d\\.]{0,71})(\\s+(\\S+)(\\s*=\\s*([-\\w\\.]{1,1024}|"[^"]{0,1024}"|'[^']{0,1024}'))?)*\\s*>", "description": "Searches for tags and there atributes according to the HTML 2.0 specification to limit length of tags to 72 characters, and length of attribute values to 1024 characters.", "matches": "<IMG src='stars.gif' alt="space" height=1>", "non_matches": "this is not a tag"}, {"id": 195, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=221", "expression": "<[a-zA-Z][^>]*\\son\\w+=(\\w+|'[^']*'|\"[^\"]*\")[^>]*>", "description": "Find HTML tags that have javascript events attached to them.", "matches": "", "non_matches": ""}, {"id": 196, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=222", "expression": "(("|')[a-z0-9\\/\\.\\?\\=\\&]*(\\.htm|\\.asp|\\.php|\\.jsp)[a-z0-9\\/\\.\\?\\=\\&]*("|'))|(href=*?[a-z0-9\\/\\.\\?\\=\\&"']*)", "description": "Will locate an URL in a webpage.\nIt'll search in 2 ways - first it will try to locate a href=, and then go to the end of the link. If there is nu href=, it will search for the end of the file instead (.asp, .htm and so on), and then take the data between the "xxxxxx" or 'xxxxxx'", "matches": "href="produktsida.asp?kategori2=218" | href="NuclearTesting.htm"", "non_matches": "U Suck"}, {"id": 197, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=223", "expression": "^((0[1-9])|(1[0-2]))\\/(\\d{4})$", "description": "This regular expressions matches dates in the format MM/YYYY where MM can be 01 to 12 and YYYY is always 4 digits long.", "matches": "12/2002 | 11/1900 | 02/1977", "non_matches": "1/1977 | 00/000 | 15/2002"}, {"id": 198, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=224", "expression": "^\\(\\d{1,2}(\\s\\d{1,2}){1,2}\\)\\s(\\d{1,2}(\\s\\d{1,2}){1,2})((-(\\d{1,4})){0,1})$", "description": "Meets german norm-standard: DIN 5008: 1996-05 for telephone numbers", "matches": "(0 34 56) 34 56 67 | (03 45) 5 67 67 | (0 45) 2 33 45-45", "non_matches": "(2345) 34 34 | (0 56) 456 456 | (3 45) 2 34-45678"}, {"id": 199, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=225", "expression": "(?:\\d|I{1,3})?\\s?\\w{2,}\\.?\\s*\\d{1,}\\:\\d{1,}-?,?\\d{0,2}(?:,\\d{0,2}){0,2}", "description": "This RE validates standard Bible verse notation.", "matches": "Genesis 3:3-4,6 | II Sam 2:11,2 | 2 Tim 3:16", "non_matches": "Genesis chap 3, verse 3 | 2nd Samuel 2"}, {"id": 200, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=226", "expression": "(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(\\d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(\\d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(\\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])))", "description": "Jason West ([email\u00a0protected]) date validator with leap years using a strict dd/mm/yyyy (ITALIAN) format", "matches": "29/02/2000 | 31/01/2000 | 30-01-2000", "non_matches": "29/02/2002 | 32/01/2002 | 10/2/2002"}, {"id": 201, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=227", "expression": "^0[1-6]{1}(([0-9]{2}){4})|((\\s[0-9]{2}){4})|((-[0-9]{2}){4})$", "description": "Regular Expression that validate phone in France.", "matches": "01 46 70 89 12 | 01-46-70-89-12 | 0146708912", "non_matches": "01-46708912 | 01 46708912 | +33235256677"}, {"id": 202, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=228", "expression": "^[A-Z]{2}[0-9]{6}[A-DFM]{1}$", "description": "UK National Insurance Number (NINO) validation. (The following modifications have been made: Only A to D are permitted as the last letter, and all letters should be in uppercase. For temporary numbers F and M are permitted for female and male holders.)", "matches": "AB123456D | AB123456F | AB123456M", "non_matches": "AB123456E | ab123456d"}, {"id": 203, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=229", "expression": "^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$", "description": "Matches UK postcodes according to the following rules 1. LN NLL eg N1 1AA 2. LLN NLL eg SW4 0QL 3. LNN NLL eg M23 4PJ 4. LLNN NLL eg WS14 0JT 5. LLNL NLL eg SW1N 4TB 6. LNL NLL eg W1C 8LQ. Modifications: 1) Doesn't allow leading zeros in first part (outward) eg BT01 3RT is incorrect; it should be BT1 3RT. 2) Only allows uppercase letters, which is the preference of the UK Post Office. 3) Permits the only postcode to break the rules - GIR 0AA (for the old Girobank, now Alliance & Leicester bank, address)", "matches": "G1 1AA | GIR 0AA | SW1 1ZZ", "non_matches": "BT01 3RT | G111 1AA"}, {"id": 204, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=230", "expression": "^([0]\\d|[1][0-2])\\/([0-2]\\d|[3][0-1])\\/([2][01]|[1][6-9])\\d{2}(\\s([0-1]\\d|[2][0-3])(\\:[0-5]\\d){1,2})?$", "description": "This is a regular expression to validate a date string in "MM/DD/YYYY" format, a date time string in "MM/DD/YYYY HH:MM" or a date time string in "MM/DD/YYYY HH:MM:SS" format.\nIt can validate date from 1600 to 2199.", "matches": "12/30/2002 | 01/12/1998 13:30 | 01/28/2002 22:35:00", "non_matches": "13/30/2002 | 01/12/1998 24:30 | 01/28/2002 22:35:64"}, {"id": 205, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=231", "expression": "((?(^[A-Z0-9-;=]*:))(?(.*)))", "description": "Usesful for importing vcards. Matches vcard elements and values.", "matches": "BEGIN: | TEL;WORK;VOICE: | TEL:", "non_matches": "begin: | TEL;PREF;"}, {"id": 206, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=232", "expression": "^<a\\s+href\\s*=\\s*"http:\\/\\/([^"]*)"([^>]*)>(.*?(?=<\\/a>))<\\/a>$", "description": "Regexp to find all external links in a HTML string.\nCan easily be modified to handle all/other links/protocols (like file/https/ftp).\nUses lookahead assertions and non-greedy modifier to check for the end </a> but still allow html tags inbetween start and end A tag.\nTakes into account that there could be linebreaks and other nasty whitespace chars in the middle of the tag.\nI am using it to find all external links in embedded HTML code and change 1.the target of the link 2.insert a "Leaving Site" logo to illustrate you are leaving site.", "matches": "<a href="http://www.mysite.com">my external link</a> | <a href="http:/", "non_matches": "<a href="myinternalpage.html">my internal link</a>"}, {"id": 207, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=233", "expression": "^([0]\\d|[1][0-2])\\/([0-2]\\d|[3][0-1])\\/([2][01]|[1][6-9])\\d{2}(\\s([0]\\d|[1][0-2])(\\:[0-5]\\d){1,2})*\\s*([aApP][mM]{0,2})?$", "description": "This is a combination of a few regular expressions found on this site. It allows for a flexible date and time combination, but requires a 12-hour clock (am/pm). Many versions of the am/pm are supported.", "matches": "12/31/2002 | 12/31/2002 08:00 | 12/31/2002 08:00 AM", "non_matches": "12/31/02 | 12/31/2002 14:00"}, {"id": 208, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=234", "expression": "
(?:\\s*([^<]+) \\s*)+
", "description": "Use this regular expression pattern to get the string1, string2, string3 .... from <blockquote>string1<br>string2<br>string3<br></blockquote>", "matches": "
string1 string2 string3
", "non_matches": ".."}, {"id": 209, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=235", "expression": "^((0?[13578]|10|12)(-|\\/)(([1-9])|(0[1-9])|([12])([0-9]?)|(3[01]?))(-|\\/)((19)([2-9])(\\d{1})|(20)([01])(\\d{1})|([8901])(\\d{1}))|(0?[2469]|11)(-|\\/)(([1-9])|(0[1-9])|([12])([0-9]?)|(3[0]?))(-|\\/)((19)([2-9])(\\d{1})|(20)([01])(\\d{1})|([8901])(\\d{1})))$", "description": "improved date validation M/D/YY or M/D/YYYY or MM/DD/YYYY or MM/DD/YY: 1/1/1920 through 12/31/2019; Feb 29 and 30 always allowed, deal with it", "matches": "1/2/03 | 02/30/1999 | 3/04/00", "non_matches": "3/4/2020 | 3/4/1919 | 4/31/2000"}, {"id": 210, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=236", "expression": "</?(\\w+)(\\s*\\w*\\s*=\\s*("[^"]*"|'[^']'|[^>]*))*|/?>", "description": "Matches HTML of XML tags, with or without attributes (single-, double-, or non-quoted), closing tags, or self-closing singleton tags.", "matches": "<font color="blue"> | </font> | <br />", "non_matches": "this is a test..."}, {"id": 211, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=237", "expression": "^(([0]?[1-9]|1[0-2])(:)([0-5][0-9]))$", "description": "This time validation expression accepts an hour between 1 and 9 (with optional leading zero) and minutes between 01 and 59. This is primarily for use with an AM/PM drop down list or radio button.", "matches": "09:00 | 9:00 | 11:35", "non_matches": "13:00 | 9.00 | 6:60"}, {"id": 212, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=238", "expression": "^ *(1[0-2]|[1-9]):[0-5][0-9] *(a|p|A|P)(m|M) *$", "description": "validate 12-hour time with am/pm after it, with optional spaces before or after, and optionally between time and am/pm.", "matches": "12:00am | 1:00 PM | 12:59 pm", "non_matches": "0:00 | 0:01 am | 13:00 pm"}, {"id": 213, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=239", "expression": "\\({1}[0-9]{3}\\){1}\\-{1}[0-9]{3}\\-{1}[0-9]{4}", "description": "", "matches": "(111)-111-1111", "non_matches": "11111111111"}, {"id": 214, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=240", "expression": "[^abc]", "description": "", "matches": "def", "non_matches": "abc"}, {"id": 215, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=241", "expression": "^(([0]?[1-9]|[1][0-2])[\\/|\\-|\\.]([0-2]\\d|[3][0-1]|[1-9])[\\/|\\-|\\.]([2][0])?\\d{2}\\s+((([0][0-9]|[1][0-2]|[0-9])[\\:|\\-|\\.]([0-5]\\d)\\s*([aApP][mM])?)|(([0-1][0-9]|[2][0-3]|[0-9])[\\:|\\-|\\.]([0-5]\\d))))$", "description": "MM-DD-20YY HH:MM AP\nMM-DD-20YY H:MM AP\nMM-DD-20YY HH:MM\nMM-DD-20YY H:MM\nMM-DD-YY HH:MM AP\nMM-DD-YY H:MM AP\nMM-DD-YY HH:MM\nMM-DD-YY H:MM\nM-D-YY HH:MM AP\nM-D-YY H:MM AP\nM-D-YY HH:MM\nM-D-YY H:MM\nwhere - can be / or - or .\nwhere : can be : or - or .\nDefinition:\n^( ;Start of Line\n([0]?[1-9]|[1][0-2]) ;00-09 or 10-12 or 1-9\n[\\/|\\-|\\.] ;/ or - or .\n([0-2]\\d|[3][0-1]|[1-9]) ;00-29 or 30-31 or 1-9\n[\\/|\\-|\\.] ;/ or - or .\n([2][0])?\\d{2} ;2000-2099 or 00-99\n\\s+ ;one or more spaces\n( ;must be either 12H notation w/AM|PM\n(\n([0][0-9]|[1][0-2]|[0-9])\n[\\:|\\-|\\.] ;: or - or .\n([0-5]\\d) ;01 thru 59\n\\s* ;zero or more spaces\n([aApP][mM])? ;nothing or AM or PM (case insensitive)\n)\n| ;or 24H notation w/out AM|PM\n(\n([0-1][0-9]|[2][0-3]|[0-9]) ;00-19 or 20-23\n[\\:|\\-|\\.] ;: or - or .\n([0-5]\\d) ;00-59\n)\n)\n)$ ;End of Line", "matches": "01/01/2002 04:42 | 5-12-02 04:42 AM | 01.01/02 04-42aM", "non_matches": "01-12-1999 4:50PM | 01-12-2002 15:10PM | 01-12-002 8:20PM"}, {"id": 216, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=242", "expression": "^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$", "description": "Match any number between 1 and 50, no characters, no empty sets, and not zero. Match numbers greater than 1 and less than 51, no spaces, no characters.", "matches": "1 | 23 | 50", "non_matches": "0 | 111 | xyz"}, {"id": 217, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=243", "expression": "^([A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\\040[A-Z]{1}[a-z]{1,})$|^([A-Z]{1}[a-z]{1,}\\040[A-Z]{1}[a-z]{1,}\\040[A-Z]{1}[a-z]{1,})$|^$", "description": "Matches up to three alphabet words separated by spaces with first alphabet character of each word uppercase. Also matches empty strings.", "matches": "Sacramento | San Francisco | San Luis Obispo", "non_matches": "SanFrancisco | SanLuisObispo | San francisco"}, {"id": 218, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=244", "expression": "^([1][12]|[0]?[1-9])[\\/-]([3][01]|[12]\\d|[0]?[1-9])[\\/-](\\d{4}|\\d{2})$", "description": "Matches dates with the following format\nMonth - either MM (like 01) or M (like 1) - from 1 to 12\nDay - either DD (like 01) or D ( like 1) - from 1 to 31\nYear - either YYYY ( like 1998) or YY (like 98)\nSeparater - either - or /", "matches": "11-02-02 | 1-25-2002 | 01/25/2002", "non_matches": "13-02-02 | 11.02.02 | 11/32/2002"}, {"id": 219, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=245", "expression": "^([0-1]([\\s-./\\\\])?)?(\\(?[2-9]\\d{2}\\)?|[2-9]\\d{3})([\\s-./\\\\])?(\\d{3}([\\s-./\\\\])?\\d{4}|[a-zA-Z0-9]{7})$", "description": "It checks for Valid US Phone numbers.\nAccepts &amp;quot;.&amp;quot;,Space,\\,/,- as delim.", "matches": "1.222.333.1234 | 1-223-123-1232 | 12223334444", "non_matches": "1.1.123123.123 | 12-1322-112-31 | 11231321131"}, {"id": 220, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=246", "expression": "^([0-1]([\\s-./\\\\])?)?(\\(?[2-9]\\d{2}\\)?|[2-9]\\d{3})([\\s-./\\\\])?([0-9]{3}([\\s-./\\\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))", "description": "USA Alhpanumeric Valid Phone numbers", "matches": "1.222.333.1234 | 1-223-123-1232 | 1-888-425-DELL", "non_matches": "1.1.123123.123 | 12-1322-112-31 | 1-800-CALL-DEL"}, {"id": 221, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=247", "expression": "^([ \\u00c0-\\u01ffa-zA-Z'])+$", "description": "Expression to match names and dis-allow any attempts to send evil characters. In particular, it tries to allow\nnon-english names by allowing unicode characters.", "matches": "Jon Doe | J\u00f8rn | Mc'Neelan", "non_matches": "Henry); hacking attempt"}, {"id": 222, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=248", "expression": "(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])", "description": "Validates time in MySQL time format. 24 hour time colon seperated hours:minutes:seconds", "matches": "09:30:00 | 17:45:20 | 23:59:59", "non_matches": "24:00:00"}, {"id": 223, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=249", "expression": "^((([0]?[1-9]|1[0-2])(:|\\.)(00|15|30|45)?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\\.)(00|15|30|45)?))$", "description": "This expression will allow a time value with 15 minute increments. It will not accept seconds. You can use either US time or Military time format.", "matches": "1:00 PM | 6:45 am | 17:30", "non_matches": "4:32 am | 5:30:00 am | 17:01"}, {"id": 224, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=250", "expression": "^([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]([0]?[1-9]|[1][0-2])[./-]([0-9]{4}|[0-9]{2})$", "description": "Validate brazilian date formats: dd/mm/yyyy or d/m/yy or d.m.yyyy\nwith separators: . - /\nValid dates only! d (1-31)/ m (1-12)/ y (0..)\n(rizzipereira.com.br)\nFor American date format: http://www.regexlib.com/REDetails.aspx?regexp_id=932", "matches": "10/03/1979 | 1-1-02 | 01.1.2003", "non_matches": "10/03/197 | 09--02--2004 | 01 02 03"}, {"id": 225, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=251", "expression": "(^\\d*\\.?\\d*[1-9]+\\d*$)|(^[1-9]+\\d*\\.\\d*$)", "description": "Accepts only positive decimal values. Zero and negatvie numbers are non-matching. Allows zeros after last non-zero numeric value after decimal place for significant digits.", "matches": "0.050 | 5.0000 | 5000", "non_matches": "0 | 0.0 | .0"}, {"id": 226, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=252", "expression": "(^-\\d*\\.?\\d*[1-9]+\\d*$)|(^-[1-9]+\\d*\\.\\d*$)", "description": "Accepts only negative decimal values. Zero and positive numbers are non-matching. Allows zeros after last non-zero numeric value after decimal place for significant digits.", "matches": "-0.050 | -5.000 | -5", "non_matches": "0 | 0.0 | .0"}, {"id": 227, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=253", "expression": "^([2][0]\\d{2}\\/([0]\\d|[1][0-2])\\/([0-2]\\d|[3][0-1]))$|^([2][0]\\d{2}\\/([0]\\d|[1][0-2])\\/([0-2]\\d|[3][0-1])\\s([0-1]\\d|[2][0-3])\\:[0-5]\\d\\:[0-5]\\d)$", "description": "this is a regular expression that for chinese programer!\nyyyy/mm/dd hh:mm:ss", "matches": "2002/02/03 | 2002/02/03 12:12:18", "non_matches": "2002/02/36 | 02/03/2002"}, {"id": 228, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=254", "expression": "^(\\d|,)*\\.?\\d*$", "description": "Matches Numeric with Commas and a single decimal point. Also matches empty string.", "matches": "1,000 | 3,000.05 | 5,000,000", "non_matches": "abc | $100,000 | Forty"}, {"id": 229, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=255", "expression": "(\\[[Ii][Mm][Gg]\\])(\\S+?)(\\[\\/[Ii][Mm][Gg]\\])", "description": "easy when you want to allow your users to post images, but in a controlled way. I used it like this (in php):\n$text = preg_replace("/(\\[IMG\\])(\\S+?)(\\[\\/IMG\\])/is", "<a href=\\"\\\\2\\" target=\\"_blank\\"><IMG SRC=\\"\\\\2\\" align=\\"center\\" height=\\"100\\" border=\\"0\\"></a>",$text);\nso whenever they use\n[img]http://www.foo.com/bleh.jpg[/img]\nit will be converted to\n<a href="http://www.foo.com/bleh.jpg" target="_blank"><IMG SRC="http://www.foo.com/bleh.jpg" align="center" height="100" border="0"></a>\nso you get a 100 pixels high picture, and when they click on it it opens in a new window...\n(to prevent users from posting huge pictures and stuff)", "matches": "[IMG]http://bleh.jpg[/IMG] | [ImG]bleh[/imG] | [img]ftp://login:[email\u00a0protected][/img]", "non_matches": "<img src="bleh.jpg">"}, {"id": 230, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=256", "expression": "^(?(^00000(|-0000))|(\\d{5}(|-\\d{4})))$", "description": "US zip code expression that disallows 00000 or 00000-0000 for either ZIP or ZIP+4. Great for web site validation.", "matches": "12345 | 12345-6789", "non_matches": "00000 | 00000-0000 | a4650-465s"}, {"id": 231, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=257", "expression": "^[+]?\\d*$", "description": "This re was used for set numbers only!\nSomente numeros são requeridos!", "matches": "0123456789 | 1234 | 1", "non_matches": "1.0?& | a1 | 2a-"}, {"id": 232, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=258", "expression": "<[aA][ ]{0,}([a-zA-Z0-9"'_,.:;!?@$&()%=/ ]|[-]|[ \\f]){0,}>((<(([a-zA-Z0-9"'_,.:;!?@$&()%=/ ]|[-]|[ \\f]){0,})>([a-zA-Z0-9"'_,.:;!?@$&()%=/ ]|[-]|[ \\f]){0,})|(([a-zA-Z0-9"'_,.:;!?@$&()%=/ ]|[-]|[ \\f]){0,})){0,}", "description": "I wrote this sweet little (well, not so little really) reg to extract links from an HTML source.... it is very robust, give it a try.\nThe only limitation I have discovered is that it can't match invalid HTML...", "matches": "<a href='javascript:functionA();'><i>this text is italicized</i></a>", "non_matches": "<A href='#'><P</A></P>"}, {"id": 233, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=259", "expression": "^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$", "description": "Matches HTML image leaf filenames.", "matches": "good.gif | go d.GIf | goo_d.jPg", "non_matches": "junk | bad.bad.gif | slash\\gif."}, {"id": 234, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=260", "expression": "^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$", "description": "Regular expression to match valid UK postcodes.\nIn 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.\nDetails of the rules:\nFirst half of postcode\nValid formats\n[A-Z][A-Z][0-9][A-Z]\n[A-Z][A-Z][0-9][0-9]\n[A-Z][0-9][0-9]\n[A-Z][A-Z][0-9]\n[A-Z][A-Z][A-Z]\n[A-Z][0-9][A-Z]\n[A-Z][0-9]\nExceptions\nPosition - First.\nContraint - QVX not used\nPosition - Second.\nContraint - IJZ not used except in GIR 0AA\nPosition - Third.\nConstraint - AEHMNPRTVXY only used\nPosition - Forth.\nContraint - ABEHMNPRVWXY\nSecond half of postcode\nValid formats\n[0-9][A-Z][A-Z]\nExceptions\nPosition - Second and Third.\nContraint - CIKMOV not used", "matches": "DN3 6GB | SW42 4RG | GIR 0AA", "non_matches": "SEW4 5TY | AA2C 4FG | AA2 4CV"}, {"id": 235, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=261", "expression": "^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$", "description": "Accepts data of time in format h:mm and hh:mm\n^([0-1]?[0-9]|[2][0-3]):([0-5][0-9])$\nin php [0-23]:[0-59]{2} (posix)", "matches": "0:00 | 23:00 | 00:59", "non_matches": "0:0 | 24:00 | 00:60"}, {"id": 236, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=262", "expression": "^((0[1-9])|(1[0-2]))\\/(\\d{2})$", "description": "Validates MM/YY for rough checking credit card expiration dates.", "matches": "11/03 | 01/04", "non_matches": "13/03 | 10/2003"}, {"id": 237, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=264", "expression": "\\w?<\\s?\\/?[^\\s>]+(\\s+[^\"'=]+(=(\"[^\"]*\")|('[^\\']*')|([^\\s\"'>]*))?)*\\s*\\/?>", "description": "Matches tags", "matches": "", "non_matches": "<>>>world www=\"hello\" />"}, {"id": 238, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=265", "expression": "", "description": "this pattern can find all lines of script in HTML code from open to close tag range", "matches": "", "non_matches": "--"}, {"id": 239, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=266", "expression": "(^|\\s)(00[1-9]|0[1-9]0|0[1-9][1-9]|[1-6]\\d{2}|7[0-6]\\d|77[0-2])(-?|[\\. ])([1-9]0|0[1-9]|[1-9][1-9])\\3(\\d{3}[1-9]|[1-9]\\d{3}|\\d[1-9]\\d{2}|\\d{2}[1-9]\\d)($|\\s|[;:,!\\.\\?])", "description": "Incorporated other people's examples; removed extraneous parenthesis on 10/7/04. Currently the SSA site says 772 is the highest AREA number generated (http://www.ssa.gov/employer/highgroup.txt). Old expression was: (^|\\s)\\d{3}(-?|[\\. ])\\d{2}\\2\\d{4}($|\\s|[;:,!\\.\\?]). Looks for either the beginning of a line or whitespace before the beginning of the social security number, then either zero or one hyphen OR one of a period or space, then uses the \\3 to reference the value returned in the parenthesis that includes the -?|[\\. ] (basically says if the first dash, period, or space is there, then the second one is required; and if the first dash, period, or space is not there, then the second one can't be either), and finally looks for the end of a line, whitespace, or punctuation characters after the social security number.", "matches": "123-45-6789 | 123 45 6789 | 123456789", "non_matches": "12345-67-890123 | 1234-56-7890 | 123-45-78901"}, {"id": 240, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=267", "expression": "^(((((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])-(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))|((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9]))),)*)(((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-", "description": "Matches comma-separated list of IP address and IP ranges. E.g. 192.168.101.1-192.168.101.255,192.168.102.12", "matches": "192.168.101.1 | 192.168.101.1-192.168.101.255 | 192.168.101.1-192.168.101.255,192.168.102.12", "non_matches": "999.168.101.1 | 192.168.101.1- | -192.168.101.255"}, {"id": 241, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=268", "expression": "^[-+]?[1-9]\\d*\\.?[0]*$", "description": "This will check if a number is an integer. Positive integers are all the whole numbers greater than zero: 1, 2, 3, 4, 5, ... . Negative integers are all the opposites of whole numbers: -1, -2, -3,-4, -5, ... . Zero is not a whole number with either a positive or negative value, and is not an interger. Null or Empty values are not intergers.", "matches": "10 | -10 | +10.00", "non_matches": "0 | -10.50 | 10.50"}, {"id": 242, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=269", "expression": "^[\\w-]+(\\.[\\w-]+)*@([a-z0-9-]+(\\.[a-z0-9-]+)*?\\.[a-z]{2,6}|(\\d{1,3}\\.){3}\\d{1,3})(:\\d{4})?$", "description": "Matches a valid email address including ip's which are rarely used. Allows for a-z0-9_.- in the username, but not ending in a full stop i.e [email\u00a0protected] is invalid and a-z0-9- as the optional sub domain(s) with domain name and a 2-7 char (a-z) tld allowing for short tld's like ca and new ones like museum.", "matches": "[email\u00a0protected] | [email\u00a0protected]:8080 | [email\u00a0protected]", "non_matches": "user@domain | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 243, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=270", "expression": "<[^>]+>", "description": "This expression finds all opening and closing tags. Good for stripping out tags in an XML or HTML document.\nI used it to clean-up HTML documents that had XML mixed in. It found all the tags, then I just deleted the ones that weren't standard. I used it in HOMESITES extended find.", "matches": "<html> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <", "non_matches": "Any plain old text | http://www.regexlib.com/Add.aspx | xml>"}, {"id": 244, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=271", "expression": "^(([0]?[0-5][0-9]|[0-9]):([0-5][0-9]))$", "description": "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.", "matches": "30:05 | 5:05 | 02:59", "non_matches": "25:7 | 5m:16 | 60:60"}, {"id": 245, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=272", "expression": "^[0-9]{1,}(,[0-9]+){0,}$", "description": "It could be use to validate html input form (checkbox, optionbox, selectbox) when you have multiple numeric value under one field name. The validation is that the user have at lease chose one or more!", "matches": "1111 | 47,26,2,1,1111,12 | 25,1245,2122,23232", "non_matches": "111, | 1a1,111,1212,23 | 11aa,aaa,asas,asa"}, {"id": 246, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=273", "expression": "^(?!^(PRN|AUX|CLOCK\\$|NUL|CON|COM\\d|LPT\\d|\\..*)(\\..+)?$)[^\\x00-\\x1f\\\\?*<>:\\;|\\"/]+$", "description": "Additional checks for <> and " characters", "matches": "abc", "non_matches": "PRN"}, {"id": 247, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=274", "expression": "^\\d{3,3}\\.\\d{0,2}$|^E\\d{3,3}\\.\\d{0,2}$", "description": "ICD9 code pattern", "matches": "E123. | 123.0 | 045.23", "non_matches": "b123. | 3456.0"}, {"id": 248, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=275", "expression": "^([a-z0-9]+([\\-a-z0-9]*[a-z0-9]+)?\\.){0,}([a-z0-9]+([\\-a-z0-9]*[a-z0-9]+)?){1,63}(\\.[a-z0-9]{2,7})+$", "description": "[Note: this regex was tested with Macromedia's ColdFusion MX. I'm sure it'll need some massaging to work with other regex engines.] Of the few domain validating regular expressions I found in my search I didn't find a single one that reliably handled multiple levels of subdomains or TLDs. So, I wrote one and thoroughly tested it. There are a ton of matching and non-matching examples that need to be included to show the completeness of this regex.\nNon-matching: -.domain.com, -a.domain.com, -domain.com, domain-.com, any domain where the portion before the tld is greater than 63 characters.\nMatching: a.domain.com, a-a.domain.com, a--a.domain.com, a--defg.com, domain.co.uk.", "matches": "800-med-alert.com | jump.to | archive-3.www.regexlib.com", "non_matches": "example | a-.domain.com | http://regexlib.com/"}, {"id": 249, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=276", "expression": "^\\$?(\\d{1,3},?(\\d{3},?)*\\d{3}(\\.\\d{1,3})?|\\d{1,3}(\\.\\d{2})?)$", "description": "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.", "matches": "10000 | 10,000 | $1,000.00", "non_matches": "0.002 | x.0"}, {"id": 250, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=277", "expression": "^\\d{0,2}(\\.\\d{1,4})? *%?$", "description": "An expression for .NET regular expression validation controls intended to faciliate the entry of percentage values both a whole numbers or as their decimal representations. Also compatible with the default US format for string formatting for percentages.\nRecommend that if you intended accept a value passing this express that you strip the percentage signs and take measures to ensure that any whole values are converted to percentages.", "matches": "4.0% | 0.45 | .0345", "non_matches": "123 | %12"}, {"id": 251, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=278", "expression": "^(?![0-9]{6})[0-9a-zA-Z]{6}$", "description": "matches a six character "password" that has to consist of numbers and letters with at least one letter in it.", "matches": "123a12 | a12345 | aaaaaa", "non_matches": "111111"}, {"id": 252, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=279", "expression": "((^(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])$))", "description": "This Validator Validates any date from 1800 - 9999. It takes special care of Leap years and validates any format of type mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.\nSince SQL Server does not accept any date before 1/1/1753, so i hope it will meet Your Requirements.(Modified Version of Jason West's Date Validator.)", "matches": "2/2/2000 | 02/02/2000 | 02/2/2000", "non_matches": "2.2.2000 | 2-2-2000"}, {"id": 253, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=280", "expression": "{.*}", "description": "Simple, but it gave me trouble in the c#...", "matches": "{User}, thank you for submitting a new project request!", "non_matches": "Thank you for submitting a new project request!"}, {"id": 254, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=281", "expression": "^\\d* \\d*\\/{1}\\d*$|^\\d*$", "description": "This expression is used to validate fractions (entered as strings). It will also accept non-fractional entries. Simple, but effective.", "matches": "100 | 1 1/2 | 1232 5/8", "non_matches": "a 1/2 | abc | a b/c"}, {"id": 255, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=283", "expression": "^\\(?[\\d]{3}\\)?[\\s-]?[\\d]{3}[\\s-]?[\\d]{4}$", "description": "This regular expression matches 10 digit US Phone numbers in different formats. Some examples are\n1)area code in paranthesis.\n2)space between different parts of the phone number.\n3)no space between different parts of the number.\n4)dashes between parts.", "matches": "(573)8841878 | 573-884-1234 | 573 234 1256", "non_matches": "(573)(673)2345 | 573-12-2345"}, {"id": 256, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=286", "expression": "(\\/\\/-->\\s*)?<\\/?SCRIPT([^>]*)>(\\s*<!--\\s)?", "description": "Can be used to remove\n&lt;SCRIPT language=&quot;JavaScript&quot;&gt;\n&lt;!--\n//--&gt;\n&lt;/SCRIPT&gt;\nfrom embeded javascript\nShould be used as case insensitive", "matches": "<SCRIPT language="JavaScript"> <!-- //--> </SCRIPT> | <SCRIPT l", "non_matches": "<!-- //-->"}, {"id": 257, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=295", "expression": "^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\\-+)|([A-Za-z0-9]+\\.+)|([A-Za-z0-9]+\\++))*[A-Za-z0-9]+@((\\w+\\-+)|(\\w+\\.))*\\w{1,63}\\.[a-zA-Z]{2,6}$", "description": "It verifies that: - Only letters, numbers and email acceptable symbols (+, _, -, .) are allowed - No two different symbols may follow each other - Cannot begin with a symbol - Ending domain must be at least 2 letters - Supports subdomains - TLD must be between 2 and 6 letters (Ex: .ca, .museum) - Only (-) and (.) symbols are allowed in domain, but not consecutively.\nProblems:\nSee comments below", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]"}, {"id": 258, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=296", "expression": "^(\\+[1-9][0-9]*(\\([0-9]*\\)|-[0-9]*-))?[0]?[1-9][0-9\\- ]*$", "description": "International phone number check - optional country code followed by area code surrounded with '-' or '(' and ')', or just an area code optionally starting with 0, followed by phone numder. The number itself may contain spaces and '-'", "matches": "+123(45)678-910 | +123-045-67 89 10 | 01-234-56-78", "non_matches": "123(45)678 91011 | (12)345-678 | +0(12)345-6789"}, {"id": 259, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=297", "expression": "(\\s*\\(?0\\d{4}\\)?\\s*\\d{6}\\s*)|(\\s*\\(?0\\d{3}\\)?\\s*\\d{3}\\s*\\d{4}\\s*)", "description": "UK Phone Number Allows leading and trailing spaces and optional spaces after the dialing code.\nInitially the expression I posted was\n\\s*0\\d{4}\\s*\\d{6}\\s*|\\s*0\\d{3}\\s*\\d{7}\\s*\nBut this didn't include optional brackets e.g. (01603) 123123 or phone numbers in a London format e.g. 0208 123 1234", "matches": "01603 123123 | 0207 1234567 | (0208) 123 1234", "non_matches": "123 123132"}, {"id": 260, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=298", "expression": "(([01][\\.\\- +]\\(\\d{3}\\)[\\.\\- +]?)|([01][\\.\\- +]\\d{3}[\\.\\- +])|(\\(\\d{3}\\) ?)|(\\d{3}[- \\.]))?\\d{3}[- \\.]\\d{4}", "description": "167 different US telephone patterns. Options includes a)0 or 1 dial, b)area code, c).+-()space between number dial-area code-number.", "matches": "1 (999) 999 9999 | 999 999 9999 | 999 9999", "non_matches": "19999999999 | 9999999999 | 9999999"}, {"id": 261, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=301", "expression": "^(http|https|ftp)\\://(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])|([a-zA-Z0-9_\\-\\.])+\\.(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|uk|me))((:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\\-\\._\\?\\,\\'/\\\\\\+&%\\$#\\=~])*)$", "description": "First attempt at reg ex - work in progress - can't quite get it to work absolutely correctly so any comments would be great.\nMatches everything as it should apart from the last part of the IP, i.e. allows http://255.255.255.999 (which obviously it shouldn't but ran out of inspiration) so any corrections humbly and gratefully accepted.\nTLD check is not complete - just added most of the major ones but easy to dd to if you want to.\nBTW - you'll need to replace the & with just the ampersand in the reg ex", "matches": "http://www.allkins.com | http://255.255.255.255 | http://allkins.com/page.asp?action=1", "non_matches": "http://test.testing"}, {"id": 262, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=302", "expression": "(^[A-Z\u00c0-\u00dc]{1}[a-z\u00e0-\u00fc']+\\s[a-zA-Z\u00e0-\u00fc\u00c0-\u00dc]+((([\\s\\.'])|([a-z\u00e0-\u00fc']+))|[a-z\u00e0-\u00fc']+[a-zA-Z\u00e0-\u00fc\u00c0-\u00dc']+))", "description": "Checks if has the first and the last name, and check the capital letters.\nUse with the RegExp.test method", "matches": "Carlos Rodrigues | C\u00e1 de Laaa | Crras R. L. Rodrig\u00fces", "non_matches": "aa\u00e4A"}, {"id": 263, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=303", "expression": "(^((((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}))))$)", "description": "dd/mm/yy\nCheck dates between 1/1/1900 - 31/12/2099", "matches": "31/12/2099 | 1/1/1900 | 10/12/2003", "non_matches": "05/11/3000 | 11/13/2003 | 32/04/2030"}, {"id": 264, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=304", "expression": "(^\\d{3}\\x2E\\d{3}\\x2E\\d{3}\\x2D\\d{2}$)", "description": "Brazilian cpf", "matches": "123.123.123-12", "non_matches": "123.123.103.32 | 123 123 123 12 | sa3.332.322-12"}, {"id": 265, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=305", "expression": "^(\\{|\\[|\\().+(\\}|\\]|\\)).+$", "description": "Matches "clan" nicks/names.", "matches": "{CLaN}nick | [Clan]Nick | (Clan)Nick", "non_matches": "Nick"}, {"id": 266, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=306", "expression": "^(([\\w][\\w\\-\\.]*)\\.)?([\\w][\\w\\-]+)(\\.([\\w][\\w\\.]*))?$", "description": "Is used to evaluating domain names, none of the extras such as paths or protocols.", "matches": "zigamorph.com | www.zigamorph.com | localhost", "non_matches": "http://www.zigamorph.com | ftp://zigamorph.com | localhost/default.aspx"}, {"id": 267, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=307", "expression": "^([A-Za-z]\\d[A-Za-z][-]?\\d[A-Za-z]\\d)", "description": "Regular expression to match a canadian postal code where it matches a string with or without the hyphen and in upercase or lowercase", "matches": "a1a-1a1 | A1A1A1", "non_matches": "1a1-a1a | aaa-aaa | 111-111"}, {"id": 268, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=308", "expression": "^07([\\d]{3})[(\\D\\s)]?[\\d]{3}[(\\D\\s)]?[\\d]{3}$", "description": "UK Mobile phone regular expression.\nI usually run this against a telephone field to split out landlines and mobile numbers.", "matches": "07976444333 | 07956-514333 | 07988-321-213", "non_matches": "+44 07976444333 | 08956-444-444"}, {"id": 269, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=309", "expression": "^([a-zA-Z.\\s']{1,50})$", "description": "This is just a regular special char expression used to get the hax0rs off your back (hopefully). You can use this for regular open name checking if you wanted. It only fails on the insert of anything other than a-z, A-Z, and ' or whitespace. I'm open to suggestions, but try to email them to me as well as posting them to help others. Thanks.", "matches": "Jon M. Doe | Tim L. O'Doul | ...'''''", "non_matches": "Doe, Jon | <>,;:"?/ | %\\$#@!"}, {"id": 270, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=310", "expression": "^([a-zA-Z0-9!@#$%^&*()-_=+;:'"|~`<>?/{}]{1,5})$", "description": "This Regular expression validates a string that contains all printable characters with a minimum length of 1 and maximum length of 5.\nObviously the min and max can be changed to meet the users needs.\n^([a-zA-Z0-9!@#$%^&*()-_=+;:'"|~`<>?/{}]{1,5})$ This is the string, I keep getting &lt and other characters when I save it.", "matches": "ilove | $%*!_ | it", "non_matches": "123456 | This is great"}, {"id": 271, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=311", "expression": "^[0-9]{4}\\s{0,2}[a-zA-z]{2}$", "description": "Dutch postalcode expression. 4 digits followed by max. two spaces end ending on two letters.", "matches": "4006 AB | 4006ab | 4006 AB", "non_matches": "4006.ab | 4006_ab | 4006/ab"}, {"id": 272, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=312", "expression": "[^a-zA-Z \\-]|( )|(\\-\\-)|(^\\s*$)", "description": "This match fileds contain only letters, a single hyphen, a single space, not empty", "matches": "Steven Wang33 | Jing Xu", "non_matches": "Steven Wang | Jing Xu"}, {"id": 273, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=314", "expression": "^([\\(]{1}[0-9]{3}[\\)]{1}[ |\\-]{0,1}|^[0-9]{3}[\\-| ])?[0-9]{3}(\\-| ){1}[0-9]{4}$", "description": "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.\n^([\\(]{1}[0-9]{3}[\\)]{1}[ |\\-]{0,1}|^[0-9]{3}[\\-| ])?[0-9]{3}(\\-| ){1}[0-9]{4}$", "matches": "(111) 223-2332 | (222)233-2332 | 232-323-3233", "non_matches": "(ddd) 223-2332 | 222-232/2333 | 322-3223-222"}, {"id": 274, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=315", "expression": "^\\(?082|083|084|072\\)?[\\s-]?[\\d]{3}[\\s-]?[\\d]{4}$", "description": "I modified the existing phone number regex for another user looking to only allow 082, 083, 084, or 072 exchanges. Written by Jason Gaylord", "matches": "082-131-5555 | 083-145-654 | 072 555 1212", "non_matches": "131-253-4564 | 5551212 | 800 555 1212"}, {"id": 275, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=316", "expression": "^(?:(?:(?:0?[1-9]|1\\d|2[0-8])\\/(?:0?[1-9]|1[0-2]))\\/(?:(?:1[6-9]|[2-9]\\d)\\d{2}))$|^(?:(?:(?:31\\/0?[13578]|1[02])|(?:(?:29|30)\\/(?:0?[1,3-9]|1[0-2])))\\/(?:(?:1[6-9]|[2-9]\\d)\\d{2}))$|^(?:29\\/0?2\\/(?:(?:(?:1[6-9]|[2-9]\\d)(?:0[48]|[2468][048]|[13579][26]))))$", "description": "This expression validates dates in the Brazilian d/m/y format from 1/1/1600 - 12/31/9999. The days are validated for the given month and year. Leap years are validated for all 4 digits years from 1600-9999. Days and months must be 1 or 2 digits and may have leading zeros. Years must be 4 digit years, between 1600 and 9999. Date separator must be a slash (/)", "matches": "29/02/2004 | 15/3/1824 | 31/01/2001", "non_matches": "29/02/2000 | 21/10/92 | 31/02/2001"}, {"id": 276, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=317", "expression": "^([0-9A-Za-z@.]{1,255})$", "description": "This is an update of Paul Miller's RegEx. It will cut out literal <> but I haven't fully tested it, it's just a quick fix since his didn't work all that well.\nI also took out the \\s. You could add this back in but I use this for very simple password verification, and I certainly have no use for spaces in my passwords.", "matches": "BigBlue | 1234.1411 | [email\u00a0protected]", "non_matches": "<>'&amp&lt&rt*^%$"}, {"id": 277, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=318", "expression": "^\\$?(\\d{1,3},?(\\d{3},?)*\\d{3}(\\.\\d{0,2})?|\\d{1,3}(\\.\\d{0,2})?|\\.\\d{1,2}?)$", "description": "This expression will validate for US Currency with a wide range of input. Using other exps found on this site, I built this one to fix 2 main problems I was finding:\n1-a space or blank entry is non-matching\n2-use of .9 in place of .90 will match (this is for those people like me who hate to type and if I put .9 I mean .90\nHope this helps others save a little time. I feel I was pretty thorough in testing, but if you find something wrong, please post it. -Thanks", "matches": "$1.99 | 1.99 | .99", "non_matches": "$10.999 | 100,00.99 | blank"}, {"id": 278, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=319", "expression": "^(([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)$", "description": "Correct German DateTime. Does not check leap year rules!\nPossible Formats of date part:\nD.M.YYYY or D.MM.YYYY or DD.MM.YYYY or DD.M.YYYY\nPossible formats of time part:\nh:mm or hh:mm", "matches": "20.10.2003 08:10 | 24.12.2003 | 1.1.2004 8:15", "non_matches": "25.13.2004 | 20.10.2003 08:9"}, {"id": 279, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=320", "expression": "^((((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])[\\.\\-\\/]0?2[\\.\\-\\/]((1[6-9]|[2-9]\\d)?\\d{2}))|(29[\\.\\-\\/]0?2[\\.\\-\\/]((1[6-9]|[2-9]\\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((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}))|(2902((1[6-9]|[2-9]\\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$", "description": "Date with leap years. Accepts '.' '-' and '/' as separators\nd.m.yy to dd.mm.yyyy (or d.mm.yy, etc)\nEx: dd-mm-yyyy d.mm/yy dd/m.yyyy etc etc\nAccept 00 years also.", "matches": "29.2.2004 | 31121975 | 29/2-00", "non_matches": "29.2.2005 | 32121975 | 29.2/01"}, {"id": 280, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=321", "expression": "^(([0-2]*[0-9]+[0-9]+)\\.([0-2]*[0-9]+[0-9]+)\\.([0-2]*[0-9]+[0-9]+)\\.([0-2]*[0-9]+[0-9]+))$", "description": "Matches simple IP addresses. It's not too complex or long, but it does the job if you want something short/simple.", "matches": "113.173.40.255 | 171.132.248.57 | 79.93.28.178", "non_matches": "189.57.135 | 14.190.193999 | A.N.D.233"}, {"id": 281, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=322", "expression": "<[iI][mM][gG]([^>]*[^/>])", "description": "simple little RegExp to get the IMG tag from HTML", "matches": "<img src="abc.jpg"> | <img src="abc.jpg"/> | <ImG src="abc.j", "non_matches": "none"}, {"id": 282, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=323", "expression": "\\d{2}.?\\d{3}.?\\d{3}/?\\d{4}-?\\d{2}", "description": "This regular expressions matches CNPJ number. CNPJ is a Registration Number of Brazilian Companies.", "matches": "00.000.000/0000-00 | 00000000000000", "non_matches": "00-000-000-000-00 | AA.AAA.AAA/AAAA-AA"}, {"id": 283, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=324", "expression": "('.*$|Rem((\\t| ).*$|$)|"(.|"")*?")", "description": "Pulls out comments (both Rem and ') and string literals from VB or VBScript. Usefull for spell checking or review.\nNotes: The VBScript for "Rem" documentation says that it must be followed by a space but VBScript seems to accept tab characters as well.\nThe multiline flag is assumed for this search.", "matches": "' This is a comment | Rem This is a comment | " This is a string with "" and ' "", "non_matches": "" This is not a string | RemThis is not a comment | This is not a comment or a string"}, {"id": 284, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=325", "expression": "^\\d{2}\\s{1}(Jan|Feb|Mar|Apr|May|Jun|Jul|Apr|Sep|Oct|Nov|Dec)\\s{1}\\d{4}$", "description": "valid date base on Month", "matches": "01 Jan 2003", "non_matches": "01 01 2003"}, {"id": 285, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=326", "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)$", "description": "Date expression validator with format YYMMDD\nValidates leap years.\nOf course, as year has only 2 digits, it's not possible to invalidate years like 2100, 2200, 2300, etc as a non-leap years !", "matches": "751231 | 000229 | 040229", "non_matches": "750431 | 010229 | 050229"}, {"id": 286, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=327", "expression": "^[0-9]{2}[-][0-9]{2}[-][0-9]{2}$", "description": "Validates a UK Bank Sort code", "matches": "09-01-29 | 05-06-25", "non_matches": "090125"}, {"id": 287, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=328", "expression": "^((\\\"[^\\\"\\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\\-]+))$", "description": "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: !#$%^&amp;amp;*-+~/'`|{}@xyz.com\nSorry looks like this site is mangling the quote and ampersand characters - you'll have to fix that yourself.", "matches": "/A/Wacky/[email\u00a0protected] | bob.builder@[1.1.1.1] | \"blah b. blahburger\"@blah.com", "non_matches": "./A/Wacky/[email\u00a0protected] | bob.builder@[256.1.1.1] | -\"blah b. blahburger\"@blah.com"}, {"id": 288, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=329", "expression": "^(\\d|-)?(\\d|,)*\\.?\\d*$", "description": "Input for Numeric values. Handles negatives, and comma formatted values. Also handles a single decimal point", "matches": "5,000 | -5,000 | 100.044", "non_matches": "abc | Hundred | 1.3.4"}, {"id": 289, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=330", "expression": "^[1-9]+[0-9]*$", "description": "Allows only positive integers that are greater then 0. Easily modified for +/- intergers and allowing zero.", "matches": "1 | 12 | 124", "non_matches": "-1 | a | 1.0"}, {"id": 290, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=331", "expression": "^[+]447\\d{9}$", "description": "Validates a UK mobile phone number in International format", "matches": "+447974405524 | +447932205578", "non_matches": "447974407726 | +4407974407724"}, {"id": 291, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=332", "expression": "^(([0-9])|([0-1][0-9])|([2][0-3])):(([0-9])|([0-5][0-9]))$", "description": "reg. expr. 4 checking 24 time", "matches": "1:59 | 01:59 | 23:59", "non_matches": "12:63 | 25:60 | 13.10"}, {"id": 292, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=333", "expression": "^[A-Za-z0-9](([_\\.\\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\\.\\-]?[a-zA-Z0-9]+)*)\\.([A-Za-z]{2,})$", "description": "does not allow IP for domain name : [email\u00a0protected]\ndoes not allow litteral addresses "hello, how are you?"@world.com\nallows numeric domain names\nafter the last "." minimum 2 letters", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "hello@worl_d.com | he&[email\u00a0protected] | .hello@wor#.co.uk"}, {"id": 293, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=334", "expression": "\\b(((\\S+)?)(@|mailto\\:|(news|(ht|f)tp(s?))\\://)\\S+)\\b", "description": "Whilst writing a plain-text to HTML function, I ran into the problem of links that users had written with <a> tags (as opposed to just writing the URL) were linking improperly. This regular expression returns many types of URL, and preceding characters, if any. This allows you to handle each type of match appropriately", "matches": "href='http://www.deepart.org' | [email\u00a0protected] | ftp://123.123.123.123", "non_matches": "www.deepart.org | deepart.org | 123.123.123.123"}, {"id": 294, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=335", "expression": "^(([a-z])+.)+[A-Z]([a-z])+$", "description": "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": "com.test.Test | com.Test", "non_matches": "com.test.test | com.test.TEst | Com.test.Test"}, {"id": 295, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=336", "expression": "^[a-zA-Z_][a-zA-Z0-9_]*$", "description": "Matches variable names/identifier from C# (and most other languages)", "matches": "VariableName | i | Some_Value_3", "non_matches": "3ID | Hello World"}, {"id": 296, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=337", "expression": "(at\\s)(?<fullClassName>.+)(\\.)(?<methodName>[^\\.]*)(\\()(?<parameters>[^\\)]*)(\\))((\\sin\\s)(?<fileName>.+)(:line )(?<lineNumber>[\\d]*))?", "description": "Just a simple regExp to parse the stack trace. Developed when using the exception block from MS, coz they only showed the stack all bunched together. Could be used as follows:\n[C#]\nstring regExParams = @"(at\\s)(?<fullClassName>.+)(\\.)(?<methodName>[^\\.]*)(\\()(?<parameters>[^\\)]*)(\\))((\\sin\\s)(?<fileName>.+)(:line )(?<lineNumber>[\\d]*))?";\nRegex re = new System.Text.RegularExpressions.Regex(regExParams,RegexOptions.Compiled);\nMatchCollection mtc;\nmtc = re.Matches(System.Environment.StackTrace);\nforeach(Match mt in mtc)\n{\nMessageBox.Show(mt.Result("${fullClassName}"));\nMessageBox.Show(mt.Result("${methodName}"));\nMessageBox.Show(mt.Result("${parameters}"));\nMessageBox.Show(mt.Result("${fileName}"));\nMessageBox.Show(mt.Result("${lineNumber}"));\n}\nSeems to work well, but use at your own peril!!\nFeel free to use and enhance (there's probably a lot that could be done, like getting parameters individually(?), etc)", "matches": "at System.IO.__Error.WinIOError(Int32 errorCode, String str) | at ExceptionManagementQuickStartSampl", "non_matches": "ExceptionManagementQuickStartSamples.Form1.DoLogon(String userName, String password) in c:\\program f"}, {"id": 297, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=338", "expression": "^(([+]\\d{2}[ ][1-9]\\d{0,2}[ ])|([0]\\d{1,3}[-]))((\\d{2}([ ]\\d{2}){2})|(\\d{3}([ ]\\d{3})*([ ]\\d{2})+))$", "description": "Swedish phone numbers according to SIS standard", "matches": "+46 8 123 456 78 | 08-123 456 78 | 0123-456 78", "non_matches": "+46 08-123 456 78 | 08 123 456 78 | 0123 456 78"}, {"id": 298, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=339", "expression": ">(?:(?[^<]*))", "description": "Detects HTML tags open and/or closed with and without whitespace or characters in between. Good for stripping all tags from a string.", "matches": " | |
some text
", "non_matches": "<"}, {"id": 299, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=340", "expression": "^((4\\d{3})|(5[1-5]\\d{2}))(-?|\\040?)(\\d{4}(-?|\\040?)){3}|^(3[4,7]\\d{2})(-?|\\040?)\\d{6}(-?|\\040?)\\d{5}", "description": "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)", "matches": "3711-078176-01234 | 4123 5123 6123 7123 | 5123412361237123", "non_matches": "3711-4123-5123-6112"}, {"id": 300, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=341", "expression": "^((\\d?)|(([-+]?\\d+\\.?\\d*)|([-+]?\\d*\\.?\\d+))|(([-+]?\\d+\\.?\\d*\\,\\ ?)*([-+]?\\d+\\.?\\d*))|(([-+]?\\d*\\.?\\d+\\,\\ ?)*([-+]?\\d*\\.?\\d+))|(([-+]?\\d+\\.?\\d*\\,\\ ?)*([-+]?\\d*\\.?\\d+))|(([-+]?\\d*\\.?\\d+\\,\\ ?)*([-+]?\\d+\\.?\\d*)))$", "description": "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.", "matches": "8.0 | 8.0,-.38,+8.9 | 8.0, +8.8, 0.09", "non_matches": "+ | . | a,b, c"}, {"id": 301, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=342", "expression": "^(\\d{5}((|-)-\\d{4})?)|([A-Za-z]\\d[A-Za-z][\\s\\.\\-]?(|-)\\d[A-Za-z]\\d)|[A-Za-z]{1,2}\\d{1,2}[A-Za-z]? \\d[A-Za-z]{2}$", "description": "Allows Canadian, American and UK postal/zip codes. Allowing hyphens, periods, or spaces to separate.", "matches": "N9B.1Y8 | 90210-1234 | NE21 6EQ", "non_matches": "NN8 Y83"}, {"id": 302, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=343", "expression": "(.*\\.([wW][mM][aA])|([mM][pP][3])$)", "description": "Matches a file name to be either a .wma or .mp3 file. This can be used to check file uploads to make sure they are of a certain type. Substitute letters where appropriate for specific file types. To include more simply add logical 'or' (|) operator and append.", "matches": "thisfile.mp3 | [email\u00a0protected]", "non_matches": "whatever.exe | somethingelse.mpa | thisagain.wm3"}, {"id": 303, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=345", "expression": "^(([a-zA-Z]:|\\\\)\\\\)?(((\\.)|(\\.\\.)|([^\\\\/:\\*\\?\"\\|<>\\. ](([^\\\\/:\\*\\?\"\\|<>\\. ])|([^\\\\/:\\*\\?\"\\|<>]*[^\\\\/:\\*\\?\"\\|<>\\. ]))?))\\\\)*[^\\\\/:\\*\\?\"\\|<>\\. ](([^\\\\/:\\*\\?\"\\|<>\\. ])|([^\\\\/:\\*\\?\"\\|<>]*[^\\\\/:\\*\\?\"\\|<>\\. ]))?$", "description": "File Name Validator. Validates both UNC (\\\\server\\share\\file) and regular MS path (c:\\file).", "matches": "File.txt | c:\\Blah\\..\\.\\Blah Blah.Blah\\File.txt | \\\\server\\share\\file.txt", "non_matches": "File.txt | c:\\.File.txt | c:\\.\\.Blah\\File.txt"}, {"id": 304, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=346", "expression": "^[a-zA-Z0-9]{1,20}$", "description": "", "matches": "e3 | wee | w4", "non_matches": "-4"}, {"id": 305, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=347", "expression": "(NOT)?(\\s*\\(*)\\s*(\\w+)\\s*(=|<>|<|>|LIKE|IN)\\s*(\\(([^\\)]*)\\)|'([^']*)'|(-?\\d*\\.?\\d+))(\\s*\\)*\\s*)(AND|OR)?", "description": "Heres my sql clause parser regexp for recordset filtering. Does recursive query parsing all by its self. Only problem I cant figure is how to match comma separated lists of quoted strings. Tell me if you figure out how!\nThe unicodes in the re was put in by the entry form please replace them with their ascii equivalents to use it.", "matches": "Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5)", "non_matches": "Hello there | A=EXCELLENT OR | B!=POOR"}, {"id": 306, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=350", "expression": "(^(\\+?\\-? *[0-9]+)([,0-9 ]*)([0-9 ])*$)|(^ *$)", "description": "This is my basic phone number verification. it allows a + - , signs digits, spaces and blank entry", "matches": "+0335456 545 545 | -5465 545 | 5456465 5454,545", "non_matches": "fsd54df 54"}, {"id": 307, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=351", "expression": "^\\s*(?'num'\\d+(\\.\\d+)?)\\s*(?'unit'((w(eek)?)|(wk)|(d(ay)?)|(h(our)?)|(hr))s?)(\\s*$)", "description": "Validates Microsoft Project-type duration entries. Accepts a number and a unit. The number part can be integer or decimal. The unit can be several variations of weeks, days, and hours: e.g., w, wk, week, ws, wks, weeks are all valid. Whitespace between the number and the unit is optional: e.g., 1d, 2 days, 3.5w are all valid. Captures the number value in a group named num and the unit string in a group named 'unit'.", "matches": "1 day | 3.5 w | 6hrs", "non_matches": "1 | 6. days | 1 week 2 d"}, {"id": 308, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=352", "expression": "^(.|\\n){0,16}$", "description": "Limit Length - limit the length of a text box or other area to contain any character plus new line", "matches": "shorter than max", "non_matches": "string longer than max"}, {"id": 309, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=354", "expression": "(?s)(?:\\e\\[(?:(\\d+);?)*([A-Za-z])(.*?))(?=\\e\\[|\\z)", "description": "This expression will match all of the commands(escape codes) used in ANSI files. These are what were used to create the colors/blocks on BBS's for those of us that once dialed into them.\nhttp://www.wikipedia.org/wiki/ANSI_escape_code has a reference for ANSI escape codes.\nhttp://idledreams.net/lordscarlet/posts/153.aspx shows an example of the engine I have created surrounding the expression", "matches": "\u001b[32mHello | \u001b[1;35mTest | \u001b[2J", "non_matches": "abc"}, {"id": 310, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=355", "expression": ""([^"](?:\\\\.|[^\\\\"]*)*)"", "description": "Matches C style strings allowing for escaped string delimiters to be included in the match.\nALTERED 13-Dec-2003\n-------------------\nPrevious pattern was :\n"([^"](?:\\\\.|[^\\\\"]*)*)"\nChanged to:\n"([^"]*(?:\\\\.|[^\\\\"]*)*)"\nMaking the first character after the opening quote optional allows the pattern to match on empty quotes: "".", "matches": ""This is a \\"string\\"."", "non_matches": ""This is a \\"string\\"."}, {"id": 311, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=356", "expression": "(\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})", "description": "This is my all-time favourite e-mail validator. I've used it for years and it's never failed me :-)", "matches": "[email\u00a0protected] | [email\u00a0protected]", "non_matches": "foo@bar | [email\u00a0protected]"}, {"id": 312, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=357", "expression": "^([a-zA-Z]\\:)(\\\\[^\\\\/:*?<>\"|]*(?([^\"']|\"[^\"]*\")*)'(?.*)$", "description": "This expression separates a Visual Basic (VB) source code line into the code part and the comment part (if any, following an apostrophe character not enclosed in quote marks).", "matches": "a = b ' Comment | a = \"xy'z\" ' Comment", "non_matches": "a = b | rem not supported"}, {"id": 325, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=372", "expression": "^(#){1}([a-fA-F0-9]){6}$", "description": "Matches HTML Color strings. Like #FFFFFF is white and #000000 is black and #FF0000 is red and so on...", "matches": "#FFFFFF | #FF3421 | #00FF00", "non_matches": "232323 | f#fddee | #fd2"}, {"id": 326, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=373", "expression": "(?'openingTag'<)\n\\s*?\n(?'tagName'\\w+)\n# Once we've got the tagname, match zero\n# or more attribute sequences\n(\\s*?\n# Atomic Grouping for efficiency\n(?>\n(?!=[\\/\\?]?>) # Lookahead so that we can fail quickly\n# match Attribute pieces\n(?'attribName'\\w+)\n(?:\\s*\n(?'attribSign'=)\n\\s*\n)\n(?'attribValue'\n(?:\\'[^\\']*\\'|\\"[^\\"]*\\"|[^ >]+)\n)\n)\n)*\n\\s*?\n# Closing Tag can be either > or />\n(?'closeTag'[\\/\\?]?>)", "description": "Matches and segments the sections of an opening tag. For more detailed information refer to this blog entry: http://weblogs.asp.net/dneimke/posts/25616.aspx", "matches": "<head> | <script language=javascript> | <input type=submit >", "non_matches": "</head>"}, {"id": 327, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=374", "expression": "(((0[1-9]|[12][0-9]|3[01])([/])(0[13578]|10|12)([/])(\\d{4}))|(([0][1-9]|[12][0-9]|30)([/])(0[469]|11)([/])(\\d{4}))|((0[1-9]|1[0-9]|2[0-8])([/])(02)([/])(\\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])))", "description": "Date in DD/MM/YYYY format.\nFecha en formato DD/MM/AAAA.", "matches": "28/12/2003 | 28/02/2003 | 29/02/2000", "non_matches": "28-02-2003 | 30/02/2003 | 28.02.2003"}, {"id": 328, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=375", "expression": "(^\\d{5}\\x2D\\d{3}$)", "description": "Brazilian cep", "matches": "12345-678", "non_matches": "12345678 | 123456-12 | 12345.678"}, {"id": 329, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=376", "expression": "^((((((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]))))[\\-\\/\\s]?\\d{2}(([02468][048])|([13579][26])))|(((((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]?\\d{2}(([02468][1235679])|([13579][01345789]))))(\\s(((0?[1-9])|(1[0-2]))\\:([0-5][0-9])((\\s)|(\\:([0-5][0-9])\\s))([AM|PM|am|pm]{2,2})))?$", "description": "This regex will match SQL Server datetime values, allowing date only, allowing zero padded digits in month, day and hour, and will match leap years from 1901 up until 2099.", "matches": "2/29/2004 | 04/01/2003 10:01:23 am | 03-20-1999", "non_matches": "2/29/2003 | 13/30/2001 10:05:00 pm | 12/32/2003"}, {"id": 330, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=377", "expression": "[0-9A-Fa-f]{2}(\\.?)[0-9A-Fa-f]{2}(\\.?)[0-9A-Fa-f]{2}(\\.?)[0-9A-Fa-f]{2}", "description": "matches IP address in hex form in dotted or not dotted notation", "matches": "c0.a8.01.64 | 0A0275C4 | aC.10.1F.b1", "non_matches": "192.168.1.1 | 10.2.177.4 | ah.10.1f.20"}, {"id": 331, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=378", "expression": "[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}", "description": "Very Simple Match for dotted Decimal IP address. Doesn\u2019t Validate addresses", "matches": "192.168.1.1 | 10.2.234.1 | 66.129.71.122", "non_matches": "192.168.1 | 10.2.1234.1 | 66 129 71 122"}, {"id": 332, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=379", "expression": "(^[0-9]{1,8}|(^[0-9]{1,8}\\.{0,1}[0-9]{1,2}))$", "description": "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": "1.00 | 2345 | 332.3", "non_matches": ".00 | 23333333333.00 | j22.00"}, {"id": 333, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=380", "expression": "^[AaWaKkNn][a-zA-Z]?[0-9][a-zA-Z]{1,3}$", "description": "Simple match for U.S. Amateur Radio Call signs\nMust start with an A,K,N or W.\n1 or two prefix letters (not case sensitive),\nExactly one zone digit,\nOne to three suffix digits( not case sensitive).\n73", "matches": "kd6dun | W9OXZ | kb8ae", "non_matches": "kdd90bz | de7bgw | WV7BXQ5"}, {"id": 334, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=381", "expression": "^[a-zA-Z0-9]+([a-zA-Z0-9\\-\\.]+)?\\.(aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly| ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk| pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr| st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zr|zw|AERO|BIZ|COM|COOP|EDU|GOV|INFO|INT|MIL|MUSEUM|NAME|NET|ORG|AC|", "description": "Based of from Steward Haddock's domain nam\nChecks domain names. This is an attempt to deal with some of the issues of the other reg ex in not handling leading periods(.), hypens(-). and valid extension.", "matches": "mydomain.com | my-domain.info | mydomain.aero", "non_matches": "-mydomain.com | mydomain.aaa | .mydomain.com"}, {"id": 335, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=382", "expression": "^\\[assembly: AssemblyVersion\\(\\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)", "description": "using match.Result("$1.$2.$3.$4")\nwill return the assembly version of a given c# AssemblyInfo.cs file", "matches": "[assembly: AssemblyVersion("1.0.5.5")] | [assembly: AssemblyVersion("1.0.3.5")]|", "non_matches": "[assembly: AssemblyVersion("1.0.*")]"}, {"id": 336, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=383", "expression": "<!--.*?-->", "description": "", "matches": "<!-- <h1>this text has been removed</h1> --> | <!-- yada -->", "non_matches": "<h1>this text has not been removed</h1>"}, {"id": 337, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=384", "expression": "^[a-zA-Z0-9ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿ\\.\\,\\-\\/\\']+[a-zA-Z0-9ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿ\\.\\,\\-\\/\\' ]+$", "description": "This simple regexp should match any possible italian address entry and doesn't match NULL entries (good if address is required). Should work well for any other address (it's been verified against 250 addresses from most european countries, usa and australia. Please mail me if there's something missing", "matches": "v.le dell'industria 45/a | via genova 45-3-d | p.zza Garibaldi, 48", "non_matches": "[NULL]"}, {"id": 338, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=385", "expression": "^(Sun|Mon|(T(ues|hurs))|Fri)(day|\\.)?$|Wed(\\.|nesday)?$|Sat(\\.|urday)?$|T((ue?)|(hu?r?))\\.?$", "description": "This RE matches Days of the week or their abbreviations.", "matches": "Sunday | Mon | Tu", "non_matches": "day | Wedday | Payday"}, {"id": 339, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=386", "expression": "# Greedy, no-backtracking and only named groups capture.\n(?n)\n^\n(\n(?'allowDay'Sun|Mon|Fri)\n|\n(Sat\n# if we match 'ur' then constrain\n# the next char with a lookahead\n# for 'd' so that we don't match on\n# Satur.\n(?'allowDay'ur(?=d))?\n)\n|\n(\n(\n(\nT\n(\n# Accepts "Tu.", "Tue."\nue?\n|\n# Accepts "Th.", "Thu." or "Thur."\nh(ur?)?\n)\n)\n|\n(\nWed\n# if "ne" matched then constrain\n# the next chars with a lookahead\n# for 'sd' so that we don't match on\n# Wedne.\n(ne(?=sd))?\n)\n)\n(\n# If 'Tue' or 'Thur' or 'Wedne' matched\n# then match 's' in the "allowDay" Group.\n(?<=(e|r))\n(?'allowDay's)\n)?\n)\n)\n# Optional ending match of "day" or "."\n(\n# if Group[allowDay] succeeded then allow\n# the letters "day" or a full-stop. If it\n# did not succeed, a full-stop is required.\n(?(allowDay)day)|\\.\n)?\n$", "description": "", "matches": "Th | Thu | Thurs", "non_matches": "Thursd | T | Thursdays"}, {"id": 340, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=387", "expression": "<[a-zA-Z]+(\\s+[a-zA-Z]+\\s*=\\s*(\"([^\"]*)\"|'([^']*)'))*\\s*/>", "description": "Matches a valid "empty" tag (has trailing slash). Note, if you run it against a string such as <img src="test.gif" alt="<hr />"> it will indeed return a match. But, the match is not at character 1 like you'd suspect, but rather it's matching the internal <hr />. If you look at the source of this tag (http://concepts.waetech.com/unclosed_tags/) you'll find a whoe suite of regex's for matching html tags. Using them you could feasibly step though a document and avoid this mismatch as the outer tag would match *in totality* and you'd completely skip this inner match.", "matches": "", "non_matches": " | "}, {"id": 341, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=388", "expression": "^[a-z0-9][a-z0-9_\\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\\.-]{0,}[a-z0-9][\\.][a-z0-9]{2,4}$", "description": "for validate a email, but with this regex it 's possible : a._-z@a_.....____---.com", "matches": "[email\u00a0protected] | [email\u00a0protected] | [email\u00a0protected]", "non_matches": "[email\u00a0protected] | a.@_1.com | azerty_@domain-com"}, {"id": 342, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=389", "expression": "^\\w+.*$", "description": "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": "user name | o)(=-&r443*/", "non_matches": "=stuff | .username"}, {"id": 343, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=390", "expression": "^((\\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})))?$", "description": "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": "2004-2-29 | 2004-02-29 10:29:39 pm | 2004/12/31", "non_matches": "2003-2-29 | 2003-13-02 | 2003-2-2 10:72:30 am"}, {"id": 344, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=391", "expression": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$", "description": "Checks domain names. This validates domains based on latest specifications (RFCs 952 and 1123 dealing with hostnames and RFC 1035 dealing with domain name system requirements) except that it only includes realistic fully-qualified domains: 1. requires at least one subdomain 2. allows shortest top-level domains like "ca", and "museum" as longest.\nOther validation rules: 1. Labels/parts should be seperated by period. 2. Each label/part has maximum of 63 characters. 3. First and last character of label must be alphanumeric, other characters alphanumeric or hyphen. 4. Does not check maxlength of domain which incidentally is 253 characters of text (255 binary representation).\nFor a regular expression that matches ALL domains:\n^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)*[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?$", "matches": "regexlib.com | this.is.a.museum | 3com.com", "non_matches": "notadomain-.com | helloworld.c | .oops.org"}, {"id": 345, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=395", "expression": "^[\\u0081-\\uFFFF]{1,}$", "description": "Double byte charactors validator.\nThe rule applies to double byte charactor input validation.", "matches": "??? | ????", "non_matches": "ABC | ;&#F;"}, {"id": 346, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=396", "expression": "^((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))$", "description": "This validates the states and territories of the United States in a 2 character uppercase format. Very poor excuse for a regular expression! ;)\nWritten by Jason Gaylord.", "matches": "NY | PA | NJ", "non_matches": "Pennsylvania | Pa | pa"}, {"id": 347, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=397", "expression": "^([\\(]{1}[0-9]{3}[\\)]{1}[ ]{1}[0-9]{3}[\\-]{1}[0-9]{4})$", "description": "It is the exact phone number regular expression for '(###) ###-####'.\nWritten by Jason Gaylord.", "matches": "(555) 555-1212", "non_matches": "555-1212 | 1-800-555-1212 | 555-555-1212"}, {"id": 348, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=398", "expression": "^(([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)?$", "description": "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": "12/30/2002 | 12/30/2002 9:35 pm | 12/30/2002 19:35:02", "non_matches": "18/22/2003 | 8/12/99 | 8/22/2003 25:00"}, {"id": 349, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=399", "expression": "^\\d(\\d)?(\\d)?$", "description": "Matches positive whole numbers from 0-999", "matches": "0 | 12 | 876", "non_matches": "1000 | 1.23 | -234"}, {"id": 350, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=400", "expression": "^(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}$", "description": "More flexible date validator. Allows either spaces, / or - as dividers, also allows for fully uppercase months, year as 4 digit.", "matches": "01 JAN 2003 | 31/Dec/2002 | 20-Apr-2003", "non_matches": "32 Jan 2003 | 00 Dec 2003 | 10 dec 2003"}, {"id": 351, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=401", "expression": "^[1-9]{1}[0-9]{3}\\s{0,1}?[a-zA-Z]{2}$", "description": "Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters.", "matches": "1234AB | 1234 AB | 1234 ab", "non_matches": "0123AB | 123AA"}, {"id": 352, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=402", "expression": "^\\s*(((\\d*\\.?\\d*[0-9]+\\d*)|([0-9]+\\d*\\.\\d*) )\\s*[xX]\\s*){2}((\\d*\\.?\\d*[0-9]+\\d*)|([0-9]+\\d*\\.\\d*))\\s*$", "description": "This validates Length times Width times Height measurements, which consists of 3 whole or decimal numbers separated by an x.", "matches": "1.1 x 4.35 x 5.0 | 1 x 2 x 3 | 4.75 x 300.25 x 0", "non_matches": "z.56 x 6 x 7 | 1 xx 2 x 3 | 1 by 2 by 3"}, {"id": 353, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=403", "expression": "[\\\\s+,]", "description": "Simple expression for matching all commas and all whitespace characters: ASCII (13,10,44)", "matches": ", | whitespace | carrage returns", "non_matches": "cat"}, {"id": 354, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=404", "expression": "^(?:(((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}))", "description": "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.", "matches": "Jan 1, 2003 | February 29, 2004 | November 02, 3202", "non_matches": "Feb 29, 2003 | Apr 31, 1978 | jan 33,3333"}, {"id": 355, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=405", "expression": "^((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})$", "description": "This RE validates dates in the dd MMM yyyy format. Spaces separate the values.", "matches": "31 January 2003 | 29 March 2004 | 29 Feb 2008", "non_matches": "Jan 1 2003 | 31 Sept 2003 | 29 February 2003"}, {"id": 356, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=406", "expression": "^(?:J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept|Nov|Dec)em)|Octo)ber)$", "description": "This RE validate the full name of the months.", "matches": "January | May | October", "non_matches": "Jan | Septem | Octo"}, {"id": 357, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=407", "expression": "(\\d{3}.?\\d{3}.?\\d{3}-?\\d{2})", "description": "Brazilian CPF - Personal document in Brazil.", "matches": "000.000.000-00 | 00000000000", "non_matches": "0000.00.000-00 | 0000000"}, {"id": 358, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=408", "expression": "^1+0+$", "description": "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.", "matches": "10 | 110 | 1100", "non_matches": "0 | 01 | 101"}, {"id": 359, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=409", "expression": "^(((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))))$", "description": "dd/MM/yyyy with leap years 100% integrated\nValid years : from 1600 to 9999\nAs usual, many tests have been made.\nI think this one should be fine.", "matches": "29/02/2000 | 30/04/2003 | 01/01/2003", "non_matches": "29/02/2001 | 30-04-2003 | 1/1/2003"}, {"id": 360, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=410", "expression": "^\\d{1,5}(\\.\\d{1,2})?$", "description": "validate a number 5 digits and 2 decimal places allowing zero", "matches": "12345.67 | 0 | 0.1", "non_matches": "123456.78 | 123456.789 | .1"}, {"id": 361, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=411", "expression": "(?!^0*$)(?!^0*\\.0*$)^\\d{1,5}(\\.\\d{1,2})?$", "description": "validates to 5 digits and 2 decimal places but not allowing zero", "matches": "12345.12 | 0.5", "non_matches": "123456.12 | 1.234 | .1"}, {"id": 362, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=412", "expression": "^[^<>`~!/@\\#}$%:;)(_^{&*=|'+]+$", "description": "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!", "matches": "This is a test", "non_matches": " | That's it"}, {"id": 363, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=413", "expression": "^([\\(]{1}[0-9]{3}[\\)]{1}[\\.| |\\-]{0,1}|^[0-9]{3}[\\.|\\-| ]?)?[0-9]{3}(\\.|\\-| )?[0-9]{4}$", "description": "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.", "matches": "5551212 | 614555-1212 | (614)555-1212", "non_matches": "A12-5555 | (614-555-1212 | 555*1212"}, {"id": 364, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=414", "expression": "^([1-9]{1}[0-9]{3}[,]?)*([1-9]{1}[0-9]{3})$", "description": "Matches a comma-seperated list of year(s).", "matches": "1999,2001,1988 | 1999", "non_matches": "0199,1997 | 0199 | 1999,"}, {"id": 365, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=415", "expression": "<(?.*).*>(?.*)\\k>", "description": "Match the content of any regular tag/s", "matches": "Content here", "non_matches": "Content here"}, {"id": 366, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=416", "expression": "^(((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])))$", "description": "This works for all accept 01/01/0000 mainly 0000. can anybody suggest a solution.", "matches": "01/01/2001", "non_matches": "01/01/00000"}, {"id": 367, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=417", "expression": "^((\\d{5}-\\d{4})|(\\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\\d[A-Za-z]\\s?\\d[A-Za-z]\\d))$", "description": "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.", "matches": "00501 | 84118-3423 | n3a 3B7", "non_matches": "501-342 | 123324 | Q4B 5C5"}, {"id": 368, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=418", "expression": "^(?=((0[1-9]0)|([1-7][1-7]\\d)|(00[1-9])|(0[1-9][1-9]))-(?=(([1-9]0)|(0[1-9])|([1-9][1-9]))-(?=((\\d{3}[1-9])$|([1-9]\\d{3})$|(\\d[1-9]\\d{2})$|(\\d{2}[1-9]\\d)$))))", "description": "I wrote this regular expression because a project I was working on required a stricter validator on social security numbers. There are actually gov't standards on what is a valid social: The first 3 digits can't be > 779, The first 3 digits can't be 000, The second 2 digits can't be 00, and the last 4 digits can't be 0000. This regex handles all these cases and checks formatting for numbering and dashes (###-##-####)", "matches": "053-27-0293 | 770-29-2012 | 063-71-9123", "non_matches": "780-20-1230 | 000-24-1290 | 123-00-1239"}, {"id": 369, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=419", "expression": "^[a-zA-Z_]{1}[a-zA-Z0-9_]+$", "description": "This expression validates for valid C# or C++ identifier", "matches": "_12ffsd | abcd123 | abcd_23232", "non_matches": "..// | ..13e232 | abcd 3232"}, {"id": 370, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=420", "expression": "^[1]$|^[3]$|^[4]$|^[6]$|^[1]0$", "description": "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.\nThis matches inclusively.", "matches": "1 | 4 | 10", "non_matches": "13 | 2 | 0"}, {"id": 371, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=421", "expression": "^[A]$|^[C]$|^[D]$|^[F]$|^[H]$|^[K]$|^[L]$|^[M]$|^[O]$|^[P]$", "description": "This is for matching Single uppercase Letters inclusively", "matches": "A | F | P", "non_matches": "a | b | cd"}, {"id": 372, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=422", "expression": "(mailto\\:|(news|(ht|f)tp(s?))\\://)(([^[:space:]]+)|([^[:space:]]+)( #([^#]+)#)?)", "description": "this is a very little regex for use within a content management software. links within textfields has not to be written in html. the editor of the cms is instructed to use it like this: 1. mention spaces in front and behind the url 2. start url with http://, mailto://, ftp:// ... 3. use optional linktext within #linktext# (separated with single space) 4. if there is no linktext the url/email will show up as linktext 5. avoid url with spaces in filename (use %20 urldecode) replace pattern (space in front): <a href="\\\\1\\\\3\\\\4" target="_blank">\\\\3\\\\6</a>", "matches": "http://www.domain.com | http://www.domain.com/index%20page.htm #linktext# | mailto://user@domai", "non_matches": "<a href="http://www.domain.com">real html link</a> | http://www.without_space_"}, {"id": 373, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=423", "expression": "(^\\-?[0-9]*\\.?[0-9]+$)", "description": "Hi, this is my first try at regular expressions. I was having trouble understanding the syntax and finally I got it work!", "matches": "-55.5 | .55 | 5.5555555", "non_matches": "5..5 | 5.5."}, {"id": 374, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=424", "expression": "^[-]?([1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|\\.[0-9]{1,2})$", "description": "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.", "matches": "123 | 123.54 | -.54", "non_matches": "123.543 | 0012 | 1,000.12"}, {"id": 375, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=425", "expression": "^([a-zA-Z]\\:|\\\\\\\\[^\\/\\\\:*?\"<>|]+\\\\[^\\/\\\\:*?\"<>|]+)(\\\\[^\\/\\\\:*?\"<>|]+)+(\\.[^\\/\\\\:*?\"<>|]+)$", "description": "This regular expression match any valid file path. It checks local drives and network path. The file extension is required.", "matches": "c:\\Test.txt | \\\\server\\shared\\Test.txt | \\\\server\\shared\\Test.t", "non_matches": "c:\\Test | \\\\server\\shared | \\\\server\\shared\\Test.?"}, {"id": 376, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=426", "expression": "(?[A-Z]\\.?\\w*\\-?[A-Z]?\\w*)\\s?(?[A-Z]\\w*|[A-Z]?\\.?)\\s?(?[A-Z]\\w*\\-?[A-Z]?\\w*)(?:,\\s|)(?Jr\\.|Sr\\.|IV|III|II|)", "description": "A regex that attempts to accurately parse the elements from a proper name where the format is in <<First, Last>> order or some permutation of that order. Critiques and suggestions for improvement are welcome.", "matches": "David F Walker | J. S. Smith, Jr. | Catherine Zeta-Jones", "non_matches": "oscar peterson"}, {"id": 377, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=427", "expression": "(?[A-Z]\\.?\\w*\\-?[A-Z]?\\w*)\\s?(?[A-Z]\\w+|[A-Z]?\\.?)\\s(?[A-Z]?\\w{0,3}[A-Z]\\w+\\-?[A-Z]?\\w*)(?:,\\s|)(?Jr\\.|Sr\\.|IV|III|II|)", "description": "Fine-tuned the previous version to handle surnames with embedded caps like McCoy and DeCarlo.", "matches": "David Walker | Bob MacDonald | Yvonne DeCarlo", "non_matches": "oscar peterson"}, {"id": 378, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=428", "expression": "(?[A-Z]\\.?\\w*\\-?[A-Z]?\\w*)\\s?(?[A-Z]\\w+|[A-Z]?\\.?)\\s(?(?:[A-Z]\\w{1,3}|St\\.\\s)?[A-Z]\\w+\\-?[A-Z]?\\w*)(?:,\\s|)(?Jr\\.|Sr\\.|IV|III|II|)", "description": "Getting closer now... this one has the functionality of the previous two and matches on names like "Jill St. John" as well.", "matches": "David F. Walker | Norm MacDonald | Jill St. John", "non_matches": "oscar peterson"}, {"id": 379, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=429", "expression": "(?[A-Z]\\w+\\-?[A-Z]?\\w*),\\s(?Jr\\.|Sr\\.|IV|III|II)?,?\\s?(?[A-Z]\\w*\\-?[A-Z]?\\w*\\.?)\\s?(?[A-Z]?\\w*\\.?)", "description": "Regex parses elements from a proper name in <<Last, First>> order and permutations. Comments and critiques are welcome.", "matches": "Walker, David F | Smith, Jr., J. S. | DeCarlo, Yvonne", "non_matches": "peterson, oscar"}, {"id": 380, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=430", "expression": "\\d{1,3}.?\\d{0,3}\\s[a-zA-Z]{2,30}\\s[a-zA-Z]{2,15}", "description": "Street Address. While far from perfect it validates street addresses reasonably. Created with absolutely no experience using a cool tool downloaded from http://www.codeproject.com/dotnet/expresso.asp?target=e%20xpresso", "matches": "2\\34 Wodonga Ave | 54a Beechworth Rd | 47/675 WODONGA DRIVE", "non_matches": "aaa Beechworth Rd | 65 Beechworth Rd | 65 Beechworth/ Rd"}, {"id": 381, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=431", "expression": "<[^>]*>", "description": "HTML Pattern Matching\nPLEASE HELP\n/<[^>]*>/ig\nThe 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.\nHow 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 "".\n<input type=button onclick='if(n.value>5)do_this();'> not this <br>\n<input type=button onclick="n>5?a():b();" value=test> not this <br>\n<input type=button onclick="n>5?a(\\"OK\\"):b('Not Ok');" value=test> not this <br>\n<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>\nAny help would be greatly appreciate. Thanks a whole lot.\nLogan", "matches": "", "non_matches": "abc"}, {"id": 382, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=432", "expression": "^([0-9]*\\-?\\ ?\\/?[0-9]*)$", "description": "Match italian telephone number with prefix followed by "/", "-" or blank and number. Usefull with numeric keybord!", "matches": "02-343536 | 02/343536 | 02 343536", "non_matches": "02a343536 | 02+343536"}, {"id": 383, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=433", "expression": "<(\\w+)(\\s(\\w*=\".*?\")?)*((/>)|((/*?)>.*?\\1>))", "description": "This RE will match XML tag elements. All elements must be closed. Won't match nested tags", "matches": "<body> text<br/>More Text </body> | <a href="link.html">Link</a", "non_matches": "<p> Some Text <p> | <hr> | <html>"}, {"id": 384, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=435", "expression": "<(.*?)>", "description": "Can anyone help me with this problem? I want X to give me the correct index of >. For example if this is my code:\nvar MsgString="<button onclick='4>5?a():b();'>";\nX=MsgString.search(/>/ig);\nX will give me 18 instead of 30. How can I get it to ignore > that are within quotes? Please help. I would really appreciate it if anybody could give me some advice. Thanks so much.\n-Logan", "matches": "<test a>", "non_matches": "none"}, {"id": 385, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=436", "expression": "(\\d{4,6})", "description": "Simple Postcode - this is the first test of the new WebService :-)", "matches": "4078 | 539999", "non_matches": "dfasdf | afasdfsad"}, {"id": 386, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=438", "expression": "^(\\d+|[a-zA-Z]+)$", "description": "Tests for all numbers OR all letters (upper or lower case)\n( posted from WebService - http://regexlib.com/webservices.asmx?op=Save )\n( updated from WebService - http://regexlib.com/webservices.asmx?op=Save )", "matches": "aaaaadddaaaaa | 1166633337", "non_matches": "1n | ppppp99"}, {"id": 387, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=439", "expression": "^\\d{5}(\\d{3})?$", "description": "Brazilian CEP. A variable of others validations, but only numbers are allowed.", "matches": "12345 | 12345678", "non_matches": "123.45 | 12345-678"}, {"id": 388, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=445", "expression": "(?s)/\\*.*\\*/", "description": "", "matches": "/* .................... */ | /* imagine lots of lines here */", "non_matches": "*/ malformed opening tag */ | /* malformed closing tag /*"}, {"id": 389, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=446", "expression": "^[0-9]{5}([\\s-]{1}[0-9]{4})?$", "description": "My first Expression. This will match US postal codes (zip codes) using simple 5 digit format with optional 4 digit extention seperated by a space or hyphen. Will not accept letters.\nexample: 12345 or 12345-1234 or 12345 1234.", "matches": "12345-1234 | 12345 | 12345 1234", "non_matches": "123451234 | 12345 a345 | a2345-1234"}, {"id": 390, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=454", "expression": "^[a-z]+[0-9]*[a-z]+$", "description": "", "matches": "aaa111bbb", "non_matches": "111aaa"}, {"id": 391, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=455", "expression": "(\\d{6}[-\\s]?\\d{12})|(\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4})", "description": "Credit card validator\nWorks for switch card numbers too\nSwitch card bit is (\\d{6}[-\\s]?\\d{12})\nCredit card bit is (\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4})\nI use this as a client side test before running a more comprehensive server side check.", "matches": "5111 1111 1111 11118 | 1234123412341324 | 123456 123456789012", "non_matches": "511a 1111 1111 11118"}, {"id": 392, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=456", "expression": "\\.com/(\\d+)$", "description": "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.", "matches": "http://aspalliance.com/123 | www.aspalliance.com/123 | http://aspalliance.com/34", "non_matches": "http://aspalliance.com/article.aspx?id=123 | http://aspalliance.com/ | http://aspalliance.com/articl"}, {"id": 393, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=457", "expression": ".*?$(?]*)(\\s[^<]*)>", "description": "grab all tags attributes...\n<img src="truc"> returns :\n<\n(1:img)\n(2: src="truc")\n>\ni use it to clean html pages to grab infos...\nuse a RegEx Replace with "<$1>" to keep only tags codes...", "matches": " | |
", "non_matches": " | |
"}, {"id": 401, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=465", "expression": "<([^<>\\s]*)(\\s[^<>]*)?>", "description": "All tags in first submatche\nAll attributes in second one...", "matches": "
| | ", "non_matches": "19-Fev-2002 - 19h00 | New Changes : | ..."}, {"id": 402, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=466", "expression": "^((Bob)|(John)|(Mary)).*$(?(\\d{1,5}(\\ 1\\/[234])?(\\x20[A-Z]([a-z])+)+ )|(P\\.O\\.\\ Box\\ \\d{1,5}))\\s{1,2}(?i:(?(((APT|B LDG|DEPT|FL|HNGR|LOT|PIER|RM|S(LIP|PC|T(E|OP))|TRLR|UNIT)\\x20\\w{1,5})|(BSMT|FRNT|LBBY|LOWR|OFC|PH|REAR|SIDE|UPPR)\\.?)\\s{1,2})?)(?[A-Z]([a-z])+(\\.?)(\\x20[A-Z]([a-z])+){0,2})\\, \\x20(?A[LKSZRAP]|C[AOT]|D[EC]|F[LM]|G[AU]|HI|I[ADL N]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD] |T[NX]|UT|V[AIT]|W[AIVY])\\x20(?(?!0{5})\\d{5}(-\\d {4})?))$", "description": "captures US street address.\nAddress format: ##### Street 2ndunit City, ST zip+4\naddress1 - must have street number and proper case street name. no punctuation or P.O Box #### punctuation manditory for P.O.\naddress2 - optional secondary unit abbr. Secondary range required for some units.\nCity - Proper case city name.\nState - State abbreviation. All caps\nzip - zip+4. Can't be all zeroes\nAbbreviations for secondary units and States are those used by the US Postal Service.\nhttp://www.usps.com/ncsc/lookups/usps_abbreviations.html\nCertain secondary units require a secondary range, see the above link\nTHis RE isn't unbreakable, Probably will allow some false positives but should work for most addresses.", "matches": "123 Park Ave Apt 123 New York City, NY 10002 | P.O. Box 12345 Los Angeles, CA 12304", "non_matches": "123 Main St | 123 City, State 00000 | 123 street city, ST 00000"}, {"id": 407, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=473", "expression": "^[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}$", "description": "This pattern match italian fiscal code (codice fiscale).", "matches": "SPGGRG73A02E625S | czzdll74h18f205w", "non_matches": "SP6FFFF3A02E625S | czzdll74h18f205"}, {"id": 408, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=474", "expression": "(\\w(\\s)?)+", "description": "Used to verify that the string consists of only A-z, 0 - 9 and underscore. Several words allowed, only one space between them. No spaces up front. Hey, I know it's easy, but it was not in the library! Plus, the test option here is not working well all the time.", "matches": "Test | TesT | tesT9 _test9", "non_matches": "\\\\\\"}, {"id": 409, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=476", "expression": "^(Function|Sub)(\\s+[\\w]+)\\([^\\(\\)]*\\)", "description": "Updated, changed [\\w]* to [\\w]+ because pattern should not match Sub (), there would be no function name which would be incorrect.\nWill extract function declarations from ASP or also VB I assume. Will even capture declarations that break across new lines or ones that use the underscore(line continuation character) in Microsoft's VB, VBA, ASP, etc. Had to put this together to document some code on a project and didn't see anything like it on the web. I hope it helps out anyone else who has to re-engineer ASP or VB code.", "matches": "Function MyFunc(Arg1, Arg2, Arg3, Arg4)", "non_matches": "'This is a comment for MyFunc(Arg1,Arg2,Arg3) and this regexp wouldn't work."}, {"id": 410, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=477", "expression": "regex", "description": "This pattern matches..", "matches": "regex", "non_matches": "a"}, {"id": 411, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=478", "expression": "^(\\(?\\d\\d\\d\\)?)?( |-|\\.)?\\d\\d\\d( |-|\\.)?\\d{4,4}(( |-|\\.)?[ext\\.]+ ?\\d+)?$", "description": "Basic US phone number matching pattern. I found this place and used a regex, so figured I'd share.", "matches": "(888) 555-1212 | 888.555.1212 | (888) 555.1212 ext. 1212", "non_matches": "(800) got-fish | 011+ 78907 2344323"}, {"id": 412, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=479", "expression": "^(([8]))$|^((([0-7]))$|^((([0-7])).?((25)|(50)|(5)|(75)|(0)|(00))))$", "description": "Time off hours edit for quarter hour(s) less than eight.", "matches": "0.25 | 7.75 | 8", "non_matches": "8.25 | 7.15 | 0.15"}, {"id": 413, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=480", "expression": "(^\\d{5}$)|(^\\d{5}-\\d{4}$)", "description": "I know its probaly in the library, but i did not see it.\nUS zip pattern\n5 digits 01234 or 5 digits + 4 01234-1234", "matches": "12345 | 12345-6789 | 01234", "non_matches": "1A234 | 12345-aaaa | 12345 1234"}, {"id": 414, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=481", "expression": "^(?(JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER|[ ]|,|/|[0-9])+)(-|\u2013|:|TO)?(?(JANUARY|FEBRUARY|MARCH|APRIL|MAY|JUNE|JULY|AUGUST|SEPTEMBER|OCTOBER|NOVEMBER|DECEMBER|[ ]|,|/|[0-9]|PRESENT)+)+(:)*", "description": "This regular expression will match date given in any format expcept (mmm). Its speciality is that it divides dates into <from> part and <to> part. Use Groups to access these parts.\ne.g. JANUARY 1998 TO JUNE 2000\n<From>="JANUARY 1998"\n<to>="JUNE 2000"", "matches": "JANUARY 2000 | 19-01-2000 | 12/11/2000", "non_matches": "\"Hello it is ordinary text\" | \"non -date text\""}, {"id": 415, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=482", "expression": "(?([0-9]|[ ]|[-]|[\\(]|[\\)]|ext.|[,])+)([ ]|[:]|\\t|[-])*(?Home|Office|Work|Away|Fax|FAX|Phone)|(?Home|Office|Work|Away|Fax|FAX|Phone|Daytime|Evening)([ ]|[:]|\\t|[-])*(?([0-9]|[ ]|[-]|[\\(]|[\\)]|ext.|[,])+)|(?([(]([0-9]){3}[)]([ ])?([0-9]){3}([ ]|-)([0-9]){4}))", "description": "Its extracts telephone numbers", "matches": "(913) 451-6461", "non_matches": "3523d3adb3"}, {"id": 416, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=483", "expression": "(?(http:[/][/]|www.)([a-z]|[A-Z]|[0-9]|[/.]|[~])*)", "description": "This is HTTP Url extractor", "matches": "http://www.abc.com | www.mpgrewal.tk", "non_matches": "noida-India | crazy123"}, {"id": 417, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=484", "expression": "(?(?![ ])(\\w|[.])*@(\\w|[.])*)", "description": "E-mail addresses matcher", "matches": "[email\u00a0protected]", "non_matches": "arnoldschwarz"}, {"id": 418, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=485", "expression": "([\\(]?(?[0-9]{3})[\\)]?)?[ \\.\\-]?(?[0-9]{3})[ \\.\\-](?[0-9]{4})", "description": "This was used to process a bunch of lines of information to determine if a line was a North American phone number or not. It accepts numbers with or without area code with or without parenthesis and sepearated by space, dash or period.", "matches": "(602) 555-3696 | 555-2069 | 213.555.8954", "non_matches": "225-582 | 11000"}, {"id": 419, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=486", "expression": "^(?n:(?(St\\.\\ )?(?-i:[A-Z]\\'?\\w+?\\-?)+)(?\\ (?i:([JS]R)|((X(X{1,2})?)?((I((I{1,2})|V|X)?)|(V(I{0,3})))?)))?,((?Dr|Prof|M(r?|(is)?)s)\\ )?(?(?-i:[A-Z]\\'?(\\w+?|\\.)\\ ??){1,2})?(\\ (?(?-i:[A-Z])(\\'?\\w+?|\\.))){0,2})$", "description": "This pattern captures <lastname><suffix>,<prefix><firstname><mname> Names must start with a capital letter. Last names may be hyphenated. First names can have two parts ie "Mary Anne" if there are more than two names after the comma. Suffixes can number up to XXX (30th). Standard prefixes are optional (Mr Miss)", "matches": "O'Brien, Miles | McDonald,Mary Ann Alison | Windsor-Smith,Barry", "non_matches": "jones, john"}, {"id": 420, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=487", "expression": "^ISBN\\s(?=[-0-9xX ]{13}$)(?:[0-9]+[- ]){3}[0-9]*[xX0-9]$", "description": "This pattern validates ISBN numbers. I've written a full description about it here: http://regexblogs.com/dneimke/posts/201.aspx", "matches": "ISBN 90-70002-34-5 | ISBN 90-70002-34-x", "non_matches": "ISBN 90-70002-34-5x | ISBN 90-700-02-34-5"}, {"id": 421, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=488", "expression": "^(((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))))$", "description": "Matching : dd/MM/yy\nLeap years compatible\nItalian style, just for more fun.\nPlease, don't forget to rate it if you use it. THX", "matches": "31/12/75 | 29/02/00 | 29/02/04", "non_matches": "01/13/01 | 29/02/01 | 29/02/2004"}, {"id": 422, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=489", "expression": ".*[\\$Ss]pecia[l1]\\W[Oo0]ffer.*", "description": "Spam stopper", "matches": "$pecia1 0ffer", "non_matches": "na"}, {"id": 423, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=490", "expression": ".*[Vv][Ii1]agr.*", "description": "Spam Stopper", "matches": "V1agra", "non_matches": "na"}, {"id": 424, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=491", "expression": ".*[Oo0][Ee][Mm].*", "description": "Spam Stopper", "matches": "OEM | 0em", "non_matches": "na"}, {"id": 425, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=492", "expression": ".*\\$AVE|\\$ave.*", "description": "Spam Stopper", "matches": "$ave", "non_matches": "save"}, {"id": 426, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=493", "expression": ".*[Pp]re[Ss\\$]cr[iI1]pt.*", "description": "Spam Stopper", "matches": "Pre$criptions", "non_matches": "na"}, {"id": 427, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=494", "expression": ".*[Pp]en[Ii1][\\$s].*", "description": "Spam Stopper", "matches": "penis", "non_matches": "na"}, {"id": 428, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=495", "expression": "^\\s*\\(?(020[7,8]{1}\\)?[ ]?[1-9]{1}[0-9{2}[ ]?[0-9]{4})|(0[1-8]{1}[0-9]{3}\\)?[ ]?[1-9]{1}[0-9]{2}[ ]?[0-9]{3})\\s*$", "description": "Matches UK phone numbers - London and regional. It started off with something fairly short posted by liljim at www.forums.devshed.com but I wanted a little more precision to weed out all the zeros. Now it also weeds out premium phone numbers (as of 19/12/03).", "matches": "02071111111 | 01000100000", "non_matches": "00000000000"}, {"id": 429, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=496", "expression": "^(0)$|^([1-9][0-9]*)$", "description": "This regular expression matches on postive whole numbers and 0. Whole numbers that are left padded with 0's are not a match.", "matches": "12 | 0 | 1200", "non_matches": "-12 | 0012"}, {"id": 430, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=497", "expression": "wsrp_rewrite\\?(?<wsrp_uri>[\\w%:&\\\\/;.]*)/wsrp_rewrite", "description": "Matches a string used to rewrite urls under the WSRP specification. It captures the URL-Encoded string that represents a url. Url validation is not provided.", "matches": "wsrp_rewrite?http%3a%2f%2fregexplib.com%3fid%3d1%26message%3dtest/wsrp_rewrite | wsrp_rewrite?http:/", "non_matches": "http%3a%2f%2fregexplib.com%3fid%3d1%26message%3dtest | http://www.regexplib.com/Add.aspx"}, {"id": 431, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=498", "expression": "^(0*100{1,1}\\.?((?<=\\.)0*)?%?$)|(^0*\\d{0,2}\\.?((?<=\\.)\\d*)?%?)$", "description": "Percentage (From 0 to 100)", "matches": "100% | 100 | 52.65%", "non_matches": "-1 | -1% | 100.1%"}, {"id": 432, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=499", "expression": "^(http|https|ftp)\\://([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&%\\$\\-]+)*@)?((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.[a-zA-Z]{2,4})(\\:[0-9]+)?(/[^/][a-zA-Z0-9\\.\\,\\?\\'\\\\/\\+&%\\$#\\=~_\\-@]*)*$", "description": "None of the other URL regex's seemed to work right for me, so i threw this together. works well with PHP's ereg().", "matches": "http://www.sysrage.net | https://64.81.85.161/site/file.php?cow=moo's | ftp://user:[email\u00a0protected]:123", "non_matches": "sysrage.net"}, {"id": 433, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=500", "expression": "((^(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])$))", "description": "Matches on MMDDYYYY only, requires all 8 digits", "matches": "01012003 | 02292000", "non_matches": "01/01/2003"}, {"id": 434, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=501", "expression": "^(http|https|ftp)\\://([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&%\\$\\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\\:[0-9]+)*(/($|[a-zA-Z0-9\\.\\,\\?\\'\\\\\\+&%\\$#\\=~_\\-]+))*$", "description": "Ok here's an updated URL regex for you folks. It allows localhost and all TLDs. Feel free to add each country code individually if you want a tighter match.", "matches": "http://site.com/dir/file.php?var=moo | https://localhost | ftp://user:[email\u00a0protected]:21/file/dir", "non_matches": "site.com | http://site.com/dir//"}, {"id": 435, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=502", "expression": "^\\d{1,7}$", "description": "Positive Whole number matched from 0 to 9999999. Only 7 digits length is allowed.", "matches": "1234567 | 9999999 | 1", "non_matches": "12345678 | 9999.99 | -1234"}, {"id": 436, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=503", "expression": "^\\d{3}\\s?\\d{3}\\s?\\d{3}$", "description": "Social Insurance Number validator.\nCanadians only need apply.\nIf somebody could help me (I'm bad at regex), I would like to modify this so that if there is one space after the 3rd digit (or 6th) then there must be one after the 6th (or third).", "matches": "123 456 789 | 123456789 | 123 456789", "non_matches": "1234 5678 9 | 123 456 7890 | 123"}, {"id": 437, "details_link": "https://regexlib.com/REDetails.aspx?regexp_id=504", "expression": "(?n:^(?=\\d)((?(0?[13578])|1[02]|(0?[469]|11)(?!.31)|0?2(?(.29)(?=.29.((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|(16|[2468][048]|[3579][26])00))|(?!.3[01])))(?[-./])(?0?[1-9]|[12]\\d|3[01])\\k(?(1[6-9]|[2-9]\\d)\\d{2})(?(?=\\x20\\d)\\x20|$))?(?