RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 22 regular expressions found.

Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20
Title Test Details Pattern Title
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. Initially the expression I posted was \s*0\d{4}\s*\d{6}\s*|\s*0\d{3}\s*\d{7}\s* But 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
Author Rating: The rating for this expression. Joe Gass
Title Test Details Pattern Title
Expression
(?n:(^(?(?![^,]+?,)((?<first>[A-Z][a-z]*?) )?((?<second>[A-Z][a-z]*?) )?((?<third>[A-Z][a-z]*?) )?)(?<last>[A-Z](('|[a-z]{1,2})[A-Z])?[a-z]+))(?(?=,)(, (?<first>[A-Z][a-z]*?))?( (?<second>[A-Z][a-z]*?))?( (?<third>[A-Z][a-z]*?))?)$)
Description
Regular expression for validating a person's full name. Matches on two general formats: 1) first second third last (where first, second, and third names are optional and all present are separated by a space); 2) last, first second third (where second and third are optional, last is followed immediately by a comma and a space, and second, and third, if present, are separated by a space from each other and from first). First corresponds to surname and last corresponds to family name. Each name part is captured to a named group to facilitate program manipulation. Each name part must begin with an uppercase letter, followed by zero or more lowercase letters, except for the last name. Last name must begin with an uppercase letter, followed by one or more lowercase letters, but will match exceptions formatted like the following: McD..., MacD..., O'R... Only format is validated, not spelling. NOTE: This regular expression uses positive and negative regex lookahead to determine the general format of the name, i.e. the presence or the absence of the comma determines the general format that will match. Furthermore, this initial version is not designed to accommodate titles and things like &quot;3rd&quot;.
Matches
John Paul Jones | Jones, John P | Jones
Non-Matches
Paul Jones, John | John J | Mr. John Paul Jones 3rd
Author Rating: Not yet rated. Jerry Schmersahl
Title Test Details Pattern Title
Expression
(^[A-Za-z])|(\s)([A-Za-z])
Description
This expression will return the first letter of each word in a string. Best used if you need to get initials from a name. &quot;James Kramer&quot; = &quot;J K&quot; &amp; &quot;Sir Richard Branson&quot; = &quot;S R B&quot; &amp; &quot;33 yoYo 654 ma&quot; = &quot;y m&quot;
Matches
James Kramer | Sir Richard Branson | 33 yoYo 654 ma
Non-Matches
33 66 4ju
Author Rating: The rating for this expression. J D
Title Test Details Pattern Title
Expression
([A-Za-z0-9.]+\s*)+,
Description
Matches comma separated names in a row based list of names. Submatches retrieve name parts, e.g. first name, middle name, initial, surname.
Matches
| bob robertson, peter k knobbly, Dr. P. Crumble
Non-Matches
Author Rating: Not yet rated. Troy Forster
Title Test Details Pattern Title
Expression
(?:Provider="??(?<Provider>[^;\n]+)"??[;\n"]??|Data\sSource=(?<DataSource>[^;\n]+)[;\n"]??|Initial\sCatalog=(?<InitialCatalog>[^;\n]+)[;\n"]??|User\sID=(?<UserID>[^;\n]+)[;\n"]??|Password="??(?<Password>[^;\n]+)"??[;\n"]??|Integrated\sSecurity=(?<IntegratedSecurity>[^;\n]+)[;\n]??|Connection\sTimeOut=(?<ConnectionTimeOut>[^;\n]+)[;\n"]??)+$
Description
This RegExp is degigned to mach SQL OLEDB Connection String to the Named Groups Properties useful for .Net MATCH EXAMPLE(the submition field is too short):Provider=&quot;SQLOLEDB.1&quot;;Data Source=(local);Initial Catalog=master;User ID=sa;Password=&quot;SA_PASS&quot;;Connection TimeOut=90
Matches
Provider="SQLOLEDB.1";Data Source=(local);Initial Catalog=master;User ID=sa;Password=&quot
Non-Matches
Any non SQL Connection String
Author Rating: The rating for this expression. Jordan Ilchev
Title Test Details Pattern Title
Expression
(^\([0]\d{2}\))(\d{6,7}$)
Description
Validator for New Zealand Mobile phone numbers. Will look for the first number being a 0 and must be a number or either 6 or 7 digits long after to initial (021) suffix
Matches
(021)1234567 | (021)123456 | (000)000000
Non-Matches
(123)1234567 | 025123456 | 0252345678
Author Rating: Not yet rated. Graeme Allwood
Title Test Details Pattern Title
Expression
\b(byte|char|short|long|float|int|double|decimal|bool|string)\b.*\s[a-zA-Z](?=;)
Description
This regex catches if the variable isn't initialized when it is declared
Matches
int a;
Non-Matches
int a =5;
Author Rating: Not yet rated. Utku Ozan CANKAYA
Title Test Details First Given Name
Expression
^((Sir|Dr.|Mr.|Mrs.|Ms.|Rev.){1}[ ]?)?([A-Z]{1}[.]{1}([A-Z]{1}[.]{1})?|[A-Z]{1}[a-z]{1,}|[A-Z]{1}[a-z]{1,}[-]{1}[A-Z]{1}[a-z]{1,}|[A-Z]{1}[a-z]{0,}[ ]{1}[A-Z]{1}[a-z]{0,}){1}$
Description
This will allow to check to make sure the string is a First or Given Name and it can be initials and it can include a prefix.
Matches
Mr. Jon, Mr.Jon,Jon,J.D., J D, Mr. Jean-Guy etc.
Non-Matches
JD, Mr Jon, MrJon, etc.
Author Rating: Not yet rated. Jon Turlington
Title Test Details NonStop ProcessName
Expression
^\${1}[a-z]{1}[a-z\d]{0,6}$
Description
NonStop or Guardian OS process or disk volume name. Must start with a "$" and have an initial letter character with up to six more alpha numberic characters
Matches
$System
Non-Matches
system
Author Rating: Not yet rated. Fred Stephens
Title Test Details Full Name Parser
Expression
^(?<title>.*\.\s)*(?<firstname>([A-Z][a-z]+\s*)+)(\s)(?<middleinitial>([A-Z]\.?\s)*)(?<lastname>[A-Z][a-zA-Z-']+)(?<suffix>.*)$
Description
Finds title, first name, middle initial, last name, and suffix of a name. Middle names are added to first name. Uses .Net capture group names.
Matches
Mary, Mary White, Mary Jo White, Dr. Mary Jo White, Dr. Mary Jo T. White, Ph.D.
Non-Matches
Mary Jo Thomas White
Author Rating: The rating for this expression. Jamison White
Title Test Details Full Name
Expression
^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$
Description
Requires a person's name including at least 2 parts. (first and last) Allows optional extra names. It allows plenty of initials as well as symbols in names. Restricts symbol usage quite a bit, but allows even names with 2 symbols. Requires last name to have at least 2 characters and cannot be an initial. Works well for filtering names on validation.
Matches
E.J. O'Malley | Jack O'Neil | Mary-Lou Elizabeth Jones
Non-Matches
Johnathan Michael S. | Prince | Teddy Has-a..Fake-Name
Author Rating: The rating for this expression. Brendan Enrick
Title Test Details DoD CAC Common Name
Expression
^\s*(?<Last>[-A-Za-z ]+)[.](?<First>[-A-Za-z ]+)(?:[.](?<Middle>[-A-Za-z ]+))?(?:[.](?<Ordinal>[IVX]+))?(?:[.](?<Number>\d{10}))\s*$
Description
Matches the Common Name (CN) of the subject of a US Department of Defense (DoD) Common Access Card (CAC). In the plain-text part of the client certificate stored on a CAC, a subject, or the person named as the user of the certificate is represented by their Common Name. This regex identifies CNs and groups the parts that represent first and last name and the unique 10-digit identifying number at the end. I optionally matches the middle name or initial and ordinal (or generation) (II,III,IV, etc), if present. It also accounts for both leading and trailing spaces as well as spaces and dashes within the name parts. It works for all common names I have ever had to deal with, though I do not know where the standard is stated to confirm compliance. It is formatted for use specifically as validation, but could be modified for search.
Matches
SMITH.JOHN.Q.0123456789 | SMITH.JANE.9876543210 | FILCH-TEMPLETON.GEORGE.FILIGREE-WHITE.XXVII.0192837465
Non-Matches
JOHN.1234567890 | SMITH.HENRY.123 | A.B.C.D.5647382910
Author Rating: The rating for this expression. Brett Peirce
Title Test Details Database schema pattern
Expression
^(\S+\.{1})(\S+\.{1})*([^\s\.]+\s*)$
Description
Matches database schema-like strings (xxx.xxx.xxx). To control the allowed characters in xxx, just change \S (non white-space characters) for the desired group. Demands one initial "xxx.", any number of intermediate "xxx." groups and a final "xxx" group.
Matches
dbo.Users.Order, dbo.Users.Order.Details
Non-Matches
dbo.Users.Order., dbo.Users.Order.Details.
Author Rating: Not yet rated. Ricardo
Title Test Details DMS Coordinates
Expression
(-?(90[ :°d]*00[ :\'\'m]*00(\.0+)?|[0-8][0-9][ :°d]*[0-5][0-9][ :\'\'m]*[0-5][0-9](\.\d+)?)[ :\?\"s]*(N|n|S|s)?)[ ,]*(-?(180[ :°d]*00[ :\'\'m]*00(\.0+)?|(1[0-7][0-9]|0[0-9][0-9])[ :°d]*[0-5][0-9][ :\'\'m]*[0-5][0-9](\.\d+)?)[ :\?\"s]*(E|e|W|w)?)
Description
Latitude and Longitude in Degrees Minutes Seconds (DMS) zero padded, separated by spaces or : or (d, m, s) or (°, ', ") or run together and followed by cardinal direction initial (N,S,E,W) Longitude Degree range: -180 to 180 Latitude Degree range: -90 to 90 Minute range: 0 to 60 Second range: 0.00 to 60.00 Note: Only seconds can have decimals places. A decimal point with no trailing digits is invalid.
Matches
40:26:46N,079:56:55W | 40°26′47″N 079°58′36″W | 40d 26m 47s N 079d 58′ 36″ W | 90 00 00.0, 180 00 00.0 | 89 59 50.4141 S 090 29 20.4 E | 00 00 00.0, 000 00 00.0
Non-Matches
90 00 00.001 N 180 00 00.001 E | 9 00 00.00 N 79 00 00.00 E | 9 00 00.00, -79 00 00.00 | 90 61 50.4121 S 090 29 20.4 E | -90 48 50. N -090 29 20.4 E | 90 00 00. N, 180 00 00. E | 00 00 00., 000 00 00.
Author Rating: Not yet rated. David Jacobs
Title Test Details Validate UK telephone number NSN by initial digits and length (simple version).
Expression
^((1[1-9]|2[03489]|3[0347]|5[56]|7[04-9]|8[047]|9[018])\d{8}|(1[2-9]\d|[58]00)\d{6}|8(001111|45464\d))$
Description
Step 3: Validate the NSN produced from the pattern in step 2 and check it for length and validity. The pattern here is fairly basic. More detailed patterns for each number type are available elsewhere. Step 4 is to format the number correctly. This needs a variety of RegEx patterns each based on the initial digits and number length.
Matches
20 3000 5555, 121 555 7777, 1750 618888, 1750 62555, 19467 55555, 16977 3555, 303 555 7788, 500 777999, 55 4455 7788, 70 7788 5577, 800 555777, 800 444 7799, 845 333 5577, 871 444 5577, 909 555 7788 after removing spaces
Non-Matches
20 444 666, 20 555 7777, 1999 5577, 1999 555 7799, 22 5000 7777, 800 55555, 803 555777, 815 555 7777, 845 8888 9999
Author Rating: The rating for this expression. g1smd
Title Test Details Validate UK telephone number NSN by initial digits and length (detailed version).
Expression
^(2(?:0[01378]|3[0189]|4[017]|8[0-46-9]|9[012])\d{7}|1(?:(?:1(?:3[0-48]|[46][0-4]|5[012789]|7[0-49]|8[01349])|21[0-7]|31[0-8]|[459]1\d|61[0-46-9]))\d{6}|1(?:2(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-4789]|7[013-9]|9\d)|3(?:0\d|[25][02-9]|3[02-579]|[468][0-46-9]|7[1235679]|9[24578])|4(?:0[03-9]|2[02-5789]|[37]\d|4[02-69]|5[0-8]|[69][0-79]|8[0-5789])|5(?:0[1235-9]|2[024-9]|3[0145689]|4[02-9]|5[03-9]|6\d|7[0-35-9]|8[0-468]|9[0-5789])|6(?:0[034689]|2[0-689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0124578])|7(?:0[0246-9]|2\d|3[023678]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-5789]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\d|8[02-9]|9[02569])|9(?:0[02-589]|2[02-689]|3[1-5789]|4[2-9]|5[0-579]|6[234789]|7[0124578]|8\d|9[2-57]))\d{6}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-4789]|8[345])))|3(?:638[2-5]|647[23]|8(?:47[04-9]|64[015789]))|4(?:044[1-7]|20(?:2[23]|8\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[123]))|5(?:24(?:3[2-79]|6\d)|276\d|6(?:26[06-9]|686))|6(?:06(?:4\d|7[4-79])|295[567]|35[34]\d|47(?:24|61)|59(?:5[08]|6[67]|74)|955[0-4])|7(?:26(?:6[13-9]|7[0-7])|442\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\d|37(?:5[2-5]|8[239])|84(?:3[2-58]))|9(?:0(?:0(?:6[1-8]|85)|52\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\d{3}|176888[234678]\d{2}|16977[23]\d{3})|7(?:[1-4]\d\d|5(?:0[0-8]|[13-9]\d|2[0-35-9])|624|7(?:0[1-9]|[1-7]\d|8[02-9]|9[0-689])|8(?:[014-9]\d|[23][0-8])|9(?:[04-9]\d|1[02-9]|2[0-35-9]|3[0-689]))\d{6}|76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\d{6}|80(?:0(?:1111|\d{6,7})|8\d{7})|500\d{6}|87[123]|9(?:[01]\d|8[0-3]))\d{7}|8(?:4(?:5464\d|[2-5]\d{7})|70\d{7})|70\d{8}|56\d{8}|3[0347]|55)\d{8}$
Description
Step 3: Validate the NSN produced from the pattern in step 2 and check it for length and validity. The pattern here is very detailed matching every valid UK prefix, and rejecting large numbers of non-valid ranges. Step 4 will be to format the number correctly. This needs a variety of RegEx patterns each based on the initial digits and number length as shown in the article mentioned below.
Matches
20 3000 5555, 121 555 7777, 1750 618888, 1750 62555, 19467 55555, 16977 3555, 303 555 7788, 500 777999, 55 4455 7788, 70 7788 5577, 800 555777, 800 444 7799, 845 333 5577, 871 444 5577, 909 555 7788 after removing spaces
Non-Matches
20 444 666, 20 555 7777, 1750 61555, 1999 55777, 1999 555777, 22 5000 7777, 800 55555, 803 555777, 805 555 7777, 845 8888 9999
Author Rating: The rating for this expression. g1smd
Title Test Details ROI Mobile Telephone Number
Expression
^0(83|85|86|87|88|89)\s?\d{1}\s?\d{1}\s?\d{1}\s?\d{1}\s?\d{1}\s?\d{1}\s?\d{1}$
Description
Matches mobile telephone numbers in Republic of Ireland. Allows for spaces at any point after the initial 08x part. Will only validate legitimate mobile prefixes, will not validate old pager numbers (082).
Matches
0831234567 089 123 1234
Non-Matches
0841234567 081 123 1234
Author Rating: The rating for this expression. Tim
Title Test Details ITU E.123 Phone Validation
Expression
^\+\d{1,3}\s\d{3}\s\d{3}\s\d{4}
Description
ITU E.123 International Validation Phone. plus initial and only numbers and white spaces.
Matches
+1 982 234 2341 | +61 282 538 3812 | +52 811 799 6100 | +243 111 412 8900
Non-Matches
1 982 234 2341 | +1 982-234-2341 | +1 (982) 234-2341
Author Rating: Not yet rated. Julio Vega
Title Test Details UK Driving Licence Number
Expression
^[A-Z9]{5}[0-9]([05][1-9]|[16][0-2])(0[1-9]|[12][0-9]|3[01])[0-9][A-Z9][0-9][A-Z0-9]([0-9]{2}?)$
Description
The Driving Licence Number consists of letter and numbers mainly taken from the holders personal information, consisting of First 5 chars of surname 1st digit of year of birth Month of birth day of birth 2nd digit of year of birth initials (2) a digit (usually 9) 2 check characters 2 digit serial number
Matches
SMITH610225PJ9WE01
Non-Matches
SMITH613225PJ9WE01
Author Rating: Not yet rated. PJWhitfield
Title Test Details https://skincaresfreetrial.com/purest-skin-care/
Expression
for an extended time.
Description
Purest Skin Care Stress and worry literally create not only poor health, but wrinkles as thoroughly. According to the AMA (American Medical Association), stress is in charge of 89-85% regarding human illness! But there's more, it additionally wreak chaos on our outward appearance. I suppose you could say you're getting a skin lightener to fade liver spots and a material that soothes your skin safely and effectively while doing so. Many people consider products which help them heal faster. They might have chemical compositions which might treat your skin initially but harm inside the long open. Hence opt for products which have content from natural finances. Natural products concentrate on cleaning and improving skin tone. They recieve treatment on maintaining healthy skin for an extended time. https://skincaresfreetrial.com/purest-skin-care/
Matches
dfsdf
Non-Matches
ffds
Author Rating: Not yet rated. Jaco dexe
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials