173 regular expressions found in this category!
Displaying page
of
pages;
Items to
| 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 |
^[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 |
| Author |
Rating:
Not yet rated.
Andrew Deren
|
| Title |
Test
Details
Pattern Title
|
| 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.
This is a modification from the regular expression submitted by James Bray ( [email protected]). 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 |
| Author |
Rating:
Not yet rated.
V. Lorz
|
| Title |
Test
Details
Pattern Title
|
| 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!
The 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 |
| Author |
Rating:
Not yet rated.
Joseph Warwick
|
| Title |
Test
Details
Pattern Title
|
| 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 |
| Author |
Rating:
Not yet rated.
Rick Spiewak
|
| 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
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 |
^(.|\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 |
| Author |
Rating:
Not yet rated.
David Yack
|
| Title |
Test
Details
AMD Athlon/Duron Codes (not Athlon 64)
|
| Expression |
^((A(((H[MX])|(M(P|SN))|(X((D[ACH])|(M[DS]))?)))?)|(K7(A)?)|(D(H[DLM])?))(\d{3,4})[ABD-G][CHJK-NPQT-Y][Q-TV][1-4][B-E]$ |
| Description |
Matches valid reference codes for AMD Athlon and Duron processors (not Athlon 64). |
| Matches |
AXDA3200DKV4E | A1000AMT3B | D800AUT1B |
| Non-Matches |
N/A |
| Author |
Rating:
Not yet rated.
Amos Hurd
|
| Title |
Test
Details
Pattern Title
|
| 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 |
| Author |
Rating:
Not yet rated.
Chris Craft
|
| Title |
Test
Details
Pattern Title
|
| 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.
http://www.wikipedia.org/wiki/ANSI_escape_code has a reference for ANSI escape codes.
http://idledreams.net/lordscarlet/posts/153.aspx shows an example of the engine I have created surrounding the expression |
| Matches |
[32mHello | [1;35mTest | [2J |
| Non-Matches |
abc |
| Author |
Rating:
Not yet rated.
Doug Moore
|
| Title |
Test
Details
Pattern Title
|
| 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 |
|
| Non-Matches |
whatever.exe | somethingelse.mpa | thisagain.wm3 |
| Author |
Rating:
Not yet rated.
Pete Samwel
|
| 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 |
^[\u0081-\uFFFF]{1,}$ |
| Description |
Double byte charactors validator.
The rule applies to double byte charactor input validation. |
| Matches |
??? | ???? |
| Non-Matches |
ABC | ;&#F; |
| Author |
Rating:
Not yet rated.
Max Lu
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[^#]([^ ]+ ){6}[^ ]+$ |
| Description |
We've come across the situation where we had to extract the IIS-Log entries without the header information. The data is far more complex than the sample given.
Explanation:
^[^#] = lines not beginnin with #
([^ ]+ ){6} = 6 times no space until one space
[^ ]+ = no spaces allowed...
$ = ...until end of line
For further explanation don't hesitate to write E-Mail. |
| Matches |
1111 2222 33 44444 55 6 7777 |
| Non-Matches |
#IIS Logfile header |
| Author |
Rating:
Not yet rated.
Volker Roth
|
| Title |
Test
Details
Pattern Title
|
| 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 |
| Author |
Rating:
Not yet rated.
Santosh Potadar
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[AaWaKkNn][a-zA-Z]?[0-9][a-zA-Z]{1,3}$ |
| Description |
Simple match for U.S. Amateur Radio Call signs
Must start with an A,K,N or W.
1 or two prefix letters (not case sensitive),
Exactly one zone digit,
One to three suffix digits( not case sensitive).
73
|
| Matches |
kd6dun | W9OXZ | kb8ae |
| Non-Matches |
kdd90bz | de7bgw | WV7BXQ5 |
| Author |
Rating:
Not yet rated.
David Tersigni
|
| Title |
Test
Details
Pattern Title
|
| 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 |
| Author |
Rating:
Not yet rated.
Rod Early
|
Displaying page
of
pages;
Items to