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

Please support RegExLib Sponsors

Sponsors

Browse Expressions by Category

173 regular expressions found in this category!

Expressions in category: Misc

Change page:   |    Displaying page 6 of 9 pages; Items 101 to 120
Title Test Details Pattern Title
Expression
(^0[78][2347][0-9]{7})
Description
checks for valid South African cellular numbers
Matches
0834128458 | 0749526308
Non-Matches
0861212308 | 0892549851
Author Rating: Not yet rated. Zahir Jacobs
Title Test Details Text Extension
Expression
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*))+\.(txt|TXT)$
Description
This RE validates a path/file of type txt (text file) This 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
Author Rating: Not yet rated. Michael Ash
Title Test Details Roman numerials
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
Author Rating: Not yet rated. Michael Ash
Title Test Details Pattern Title
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
Author Rating: Not yet rated. Qing Jiang
Title Test Details Pattern Title
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 Checks 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. "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
Author Rating: Not yet rated. Andre Van Der Merwe
Title Test Details Pattern Title
Expression
^\d{5}(-\d{3})?$
Description
Matches standard 5 digit Brazilian Postal Codes (CEP), or the CEP + 3 digits (distribution identifiers - suffix). For 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
Author Rating: Not yet rated. Carlos Nascimento
Title Test Details Pattern Title
Expression
(a|b|c).(a.b)*.b+.c
Description
Matches
autbfc
Non-Matches
attc
Author Rating: Not yet rated. Daniel Hou
Title Test Details Pattern Title
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. Should be combined with a check for length <= 63 characters and that $2 is in a list of top-level domains.
Matches
freshmeat.net | 123.com | TempLate-toolkKt.orG
Non-Matches
-dog.com | ?boy.net | this.domain
Author Rating: Not yet rated. Nathan Pitts
Title Test Details Pattern Title
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:
Author Rating: Not yet rated. Ted Rudyk
Title Test Details Pattern Title
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
Author Rating: Not yet rated. K Thompson
Title Test Details Pattern Title
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 | '''''
Author Rating: Not yet rated. Peter Friese
Title Test Details Pattern Title
Expression
[^A-Za-z0-9_@\.]|@{2,}|\.{5,}
Description
Used as a username validation script requires: 1. Allows All Alphanumeric characters & underscore 2. Allows One "@" character 3. Allows Five "." periods 4. Rejects spaces
Matches
user name | user#name | .....
Non-Matches
User_Name1 | username@foo.com | user.name@mail.foo.com
Author Rating: Not yet rated. Theo Tillotson
Title Test Details Pattern Title
Expression
^[a-zA-Z0-9\s.\-_']+$
Description
Alphanumeric, hyphen apostrophe, comma dash spaces
Matches
dony d'gsa
Non-Matches
^[a-zA-Z0-9\s.\-_']+$
Author Rating: Not yet rated. Sonal Bordia
Title Test Details Pattern Title
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)))
Author Rating: Not yet rated. Rambabu Tummala
Title Test Details Pattern Title
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
Author Rating: Not yet rated. Todd Krabach
Title Test Details Pattern Title
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) This expression defines the new zip code format for Argentina.
Matches
C1406HHA | A4126AAB | c1406hha
Non-Matches
c1406HHA | 4126 | C1406hha
Author Rating: Not yet rated. Gabriel Garcia
Title Test Details Pattern Title
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
Author Rating: Not yet rated. Tommy Ullberg
Title Test Details Pattern Title
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 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 Thanks 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
Author Rating: Not yet rated. Dave Sparks
Title Test Details Pattern Title
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. Only 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
Author Rating: Not yet rated. Samuel Mota
Title Test Details Pattern Title
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: [user=name1,name2,...,nameN;][group=group1,group2,...,groupN;][level=number;] Each 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
Author Rating: Not yet rated. Michael Scovetta
Change page:   |    Displaying page 6 of 9 pages; Items 101 to 120

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