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: 25 regular expressions found.

Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20
Title Test Details Pattern Title
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
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
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
Author Rating: Not yet rated. Matt Biggin
Title Test Details Pattern Title
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: [C#] string regExParams = @"(at\s)(?<fullClassName>.+)(\.)(?<methodName>[^\.]*)(\()(?<parameters>[^\)]*)(\))((\sin\s)(?<fileName>.+)(:line )(?<lineNumber>[\d]*))?"; Regex re = new System.Text.RegularExpressions.Regex(regExParams,RegexOptions.Compiled); MatchCollection mtc; mtc = re.Matches(System.Environment.StackTrace); foreach(Match mt in mtc) { MessageBox.Show(mt.Result("${fullClassName}")); MessageBox.Show(mt.Result("${methodName}")); MessageBox.Show(mt.Result("${parameters}")); MessageBox.Show(mt.Result("${fileName}")); MessageBox.Show(mt.Result("${lineNumber}")); } Seems to work well, but use at your own peril!! Feel 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
Author Rating: The rating for this expression. Mike Stancombe
Title Test Details Pattern Title
Expression
^(?!000)(?!666)(?<SSN3>[0-6]\d{2}|7(?:[0-6]\d|7[012]))([- ]?)(?!00)(?<SSN2>\d\d)\1(?!0000)(?<SSN4>\d{4})$
Description
Updated on 3/4/2004 per feedback to additionally exclude SSNs that begin with 666 which, as reported, are also not valid. Regular expression for validating US Social Security Numbers. Accepts optional hyphens or spaces as formatting characters. Parses the three subfields of the SSN into three named sub-strings (SSN1, SSN2, and SSN3) to facilitate program use. Rejects matches on all zeros for any individual subfield of the Social Security Number. Matches only on those SSNs that fall within the range of numbers currently allocated by the Social Security Administration.
Matches
111223333 | 111-22-3333 | 111 22 3333
Non-Matches
111003333 | 111 22-3333 | 666-22-3333
Author Rating: Not yet rated. Jerry Schmersahl
Title Test Details Pattern Title
Expression
^(?!000)([0-6]\d{2}|7([0-6]\d|7[012])) ([ -])? (?!00)\d\d([ -|])? (?!0000)\d{4}$
Description
U.S. social security numbers (SSN), within the range of numbers that have been currently allocated. Matches the pattern AAA-GG-SSSS, AAA GG SSSS, AAA-GG SSSS, AAA GG-SSSS, AAAGGSSSS, AAA-GGSSSS, AAAGG-SSSS, AAAGG SSSS or AAA GGSSSS. All zero in any one field is not allowed. ** Additionally, spaces and/or dashes and/or nothing are allowed. In Michael Ash's example 123-45 6789 and 123456789 would fail there was a '\3' after the second octet of numbers that seemed to confuse the regex. now any combination of spaces, dashes, or nothing will work between the SSN octets. BoxerX.com thanks Michael for the regex!
Matches
145470191 | 145 47 0191 | 145-47 0191
Non-Matches
000470191 | 145-00-0191 | 145.47.0191
Author Rating: The rating for this expression. Joe Johnston
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 SSN
Expression
(^(?!000)\d{3}) ([- ]?) ((?!00)\d{2}) ([- ]?) ((?!0000)\d{4})
Description
This RegularExpression is used to validate the US - SSN. This regular expression wont allow characters as well as all zeros
Matches
123-45-6789
Non-Matches
000-00-0000
Author Rating: The rating for this expression. RadhaKrishnanMahalingam
Title Test Details Social Security Number
Expression
^(?!000)(?!666)(?!9)\d{3}([- ]?)(?!00)\d{2}\1(?!0000)\d{4}$
Description
Updated SSN regex. A very simple one for verifying a properly formatted US social security number. First three digits must be 001 - 899 and not 666. Disallows all zeros in a group.
Matches
123-45-6789
Non-Matches
123-45 6789 | 1234-56-7890 | 123-00-7890
Author Rating: The rating for this expression. tedcambron
Title Test Details Social Security Number
Expression
^(\d{3}-\d{2}-\d{4})|(\d{3}\d{2}\d{4})$
Description
This will accept SSN in the form of 123-45-6789 OR 123456789.
Matches
123-45-6789 | 123456789 | 456-63-6666
Non-Matches
123-45-459a | 222-2-2222 | 222-222222
Author Rating: The rating for this expression. Epaphrodite Dusingizimana
Title Test Details U.S. Social Security Numbers
Expression
[/,,/.,/=,\s]([0-6]\d{2}|7[0-6]\d|77[0-2])(\s|\-)?(\d{2})\2(\d{4})[/,,/.,\s]
Description
Searches for US SSNs that have either a white space, ".", ",", or "=" in front and either a white space, ".", or "," at the end. Ensures that sets are separated with the same format (either spaces, dashes, or nothing).
Matches
123-45-6789 | 123456789 | 123 45 6789 | =123-45-6789 | .123456789 | end. 123 45 6789
Non-Matches
&123-45-6789 | 1234567890 | 123 45 6789z | 123-456789 | 12345-6789
Author Rating: The rating for this expression. John Stoker
Title Test Details Social Security Number - All Rules Enforced
Expression
^((?!000)(?!666)(?:[0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-2]))-((?!00)\d{2})-((?!0000)\d{4})$
Description
Could not find a regex that truly matched the rules here http://en.wikipedia.org/wiki/Social_Security_number#Valid_SSNs So I modified an existing one to match the valid SSN rules. The first digit set will not match: 000, 666, 734 to 749, and greater than 772. * Numbers with all zeros in any digit group (000-xx-####, ###-00-####, ###-xx-0000)
Matches
455-55-4444|333-22-1111|733-11-1111
Non-Matches
734-11-1111|749-11-1111|772-11-1111
Author Rating: The rating for this expression. Tim Cartwright
Title Test Details SSN (US Social Security Number)
Expression
(?!000)(?!666)^([0-8]\d{2})(\d{2})(\d{4})$
Description
Validates SSN for INTEGERS ONLY. This does not allow spaces or dashes. Following this info: http://www.socialsecurity.gov/employer/randomization.html Starting in June 2011, the SSA will begin randomizing SSN creation. The only exclusions are SSNs beginning with 000, 666, or 900-999. That rather simplifies things.
Matches
001191873 | 667191873 | 899191873
Non-Matches
000191873 | 666191873 | 901191873
Author Rating: Not yet rated. Robert Helm
Title Test Details Improved SSN
Expression
^((?!000)(?!666)([0-6]\d{2}|7[0-2][0-9]|73[0-3]|7[5-6][0-9]|77[0-1]))(\s|\-)((?!00)\d{2})(\s|\-)((?!0000)\d{4})$
Description
Used Tim Cartwright example and added \s or - for separators.
Matches
455-55-4444|333 22-1111|733 11 1111
Non-Matches
734-00-1111|749-11-0000|666-11-1111
Author Rating: Not yet rated. Bill Fitzpatrick
Title Test Details US SSN pattern match
Expression
\b(?!000)(?!666)(?!9)[0-9]{3}[ -]?(?!00)[0-9]{2}[ -]?(?!0000)[0-9]{4}\b
Description
Finds 9 digit numbers within word boundaries, not separated or separated by - or space, not starting with 000, 666, or 900-999, not containing 00 or 0000 in the middle or at the end of SSN (in compliance with current SSN rules).
Matches
123-45-6789, 123 45 6789, 123456789, 123-45 6789, 123-456789, 123 456789, etc.
Non-Matches
000-45-6789, 666-45-6789, 123-00-6789, 123-45-0000, 900-45-6789 through 999-45-6789
Author Rating: Not yet rated. Jeff Pentz
Title Test Details Swedish social security number (Svenskt personnummer)
Expression
\b(((20)((0[0-9])|(1[0-1])))|(([1][^0-8])?\d{2}))((0[1-9])|1[0-2])((0[1-9])|(2[0-9])|(3[01]))[-+]?\d{4}[,.]?\b
Description
Matches a Swedish social security number in format xxYYMMDD-NNNN, xxYYMMDD+NNNN, YYMMDD-NNNN, YYMMDD-NNNN and YYMMDDNNN. Does not allow birth years before 1900 and after 2011. To raise the birth year to higher level of birth just change the 1[0-1] part to i.e. 1[0-4] to allow birth years up to 2014 etc. This will find the SSN within a string. Also allow for a comma(,) or period(.) behind the SSN.
Matches
7712314582 | 810325+0782 | 19771231-4582
Non-Matches
137712314582 | 201211224567 | 10880215-0987
Author Rating: Not yet rated. Emil
Title Test Details ssn randomization rule
Expression
^(?!000)(?!666)([0-8]\d{2}) ([ -])? (?!00)\d\d ([ -])? (?!0000)\d{4}$
Description
Current SSN randomization rules, also caled Social Security Number Randomization, effective since June 25, 2011. Validates 9 digit numbers, not separated or separated by - or space, not starting with 000, 666, or 900-999, not containing 00 or 0000 in the middle or at the end of SSN.
Matches
899-04 1234 | 001 99-8000 | 667999999
Non-Matches
900123456 | 000349850 | 324001234 | 765870000 | 900-12-1234
Author Rating: Not yet rated. Bryan Zayas
Title Test Details Social Security Number (SSN) issued after 6/25/2011
Expression
^(?!000)(?!666)(?!9)\d{3}[- ]?(?!00)\d{2}[- ]?(?!0000)\d{4}$
Description
I am publishing this regex that was written by Stephen M. Redd and taken from the following URL: http://www.reddnet.net/regular-expression-for-validating-a-social-security-number-ssn-issued-after-june-25-2011/. It allows a dash or space separator and accounts for the new numbers that were previously restricted prior to June 25, 2011.
Matches
123456789 | 123-45-6789 | 123 45 6789
Non-Matches
000456789 | 000-45-6789 | 000 45 6789
Author Rating: Not yet rated. Joseph Marinello
Title Test Details css invalid classname
Expression
([^\w\s\-\_])|(\b\d)|(\b[^a-zA-z\-\s]\b)|(\[^a-zA-z\-\s]+\s)|(\;+[(\s)(\d)(\W)])
Description
match css invalid classname
Matches
as-_dfa oiA4_uo-ui tyui ui-ewer3
Non-Matches
4as-_dfa oiA4_uo-u!i ty;ui 3-__ui3;;; 4as-_dfa oiA4_uo-u!i ty;ui 3-__ui3 ;- ; as-_dfa oiA4_uo-u!i ty;ui 3-__ui3;aakfaaaa ([^\s\-\w])|([^\-\w]) (\b\d)|(\b\s[\-\W]\b) !
Author Rating: Not yet rated. fabio vergani
Title Test Details Medicare HICN
Expression
((A|CA|H|JA|MA|MH|PA|PD|PH|WCA|WCD|WCH|WD|WH)[0-8][0-9]{2}(?!00)[0-9]{2}(?!0000)[0-9]{4})|([0-8][0-9]{2}(?!00)[0-9]{2}(?!0000)[0-9]{4}(A|B|Bl|B2|B3|B4|B5|B6|B7|B8|B9|BA|BD|BG|BH|BJ|BK|BL|BN|BP|BQ|BR|BT|BW|BY|Cl|C2|C3|C4|C5|C6|C7|C8|C9|CA|CB|CC|CD|CE|CF|CG|CH|CI|CJ|CK|CL|CM|CN|CO|CP|CQ|CR|CS|CT|CU|CV|CW|CX|CY|CZ|D|Dl|D2|D3|D4|D5|D6|D7|D8|D9|DA|DC|DD|DG|DH|DJ|DK|DL|DM|DN|DP|DQ|DR|DS|DT|DV|DW|DX|DY|DZ|E|El|E2|E3|E4|E5|E6|E7|E8|E9|EA|EB|EC|ED|EF|EG|EH|EJ|EK|EM|Fl|F2|F3|F4|F5|F6|F7|F8|Jl|J2|J3|J4|Kl|K2|K3|K4|K5|K6|K7|K8|K9|KA|KB|KC|KD|KE|KF|KG|KH|KJ|KL|KM|T|TA|TB|TC|TD|TE|TF|TG|TH|TJ|TK|TL|TM|TN|TP|TQ|TR|TS|TT|TU|TV|TW|TX|TY|TZ|T2|W|Wl|W2|W3|W4|W5|W6|W7|W8|W9|WB|WC|WF|WG|WJ|WR|WT))
Description
The above regular expression is current as of 5/15/2014 as per any/all documentation easily found online. CMS guidlines provides the following guidance as of 9/11/2002: http://www.cms.gov/Regulations-and-Guidance/Guidance/Manuals/downloads/ge101c02.pdf Since that date all rules have remained steadfast except the range of SSN has been expanded from a prefix of 772 to include all numbers through the prefix 899. Note: This regex assumes any/all dashes have been removed.
Matches
H265897854
Non-Matches
265897548KL
Author Rating: Not yet rated. Gary Proctor
Title Test Details SSN
Expression
Get-ChildItem -rec -exclude *.exe,*.dll |select-string "\b(?!000)(?!666)(?!9)[0-9]{3}[ |-]*[ -]?(?!00)[0-9]{2}[ |-]*[ -]?(?!0000)[0-9]{4}\b|[0-9]{3}[-| ][0-9]{2}[-| ][0-9]{4}"
Description
Social Security Search
Matches
AAA-GG-SSSS, AAA GG SSSS, AAA-GG SSSS, AAA GG-SSSS, AAAGGSSSS, AAA-GGSSSS, AAAGG-SSSS, AAAGG SSSS or AAA GGSSSS
Non-Matches
000123456, 666123456, 912345678, 123004567, 12345000
Author Rating: Not yet rated. Jamil Salomon
Change page:   |    Displaying page 1 of 2 pages; Items 1 to 20

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