Displaying page
of
pages;
Items to
| Title |
Test
Details
Pattern Title
|
| Expression |
(?!^0*$)(?!^0*\.0*$)^\d{1,10}(\.\d{1,2})?$ |
| Description |
To validate a number of 10 digits before the decimal point and atmost 2 digits after it |
| Matches |
12314 12314.2 12314.32 |
| Non-Matches |
12314.212 12123.222 |
| Author |
Rating:
Not yet rated.
Nilarka Prasanna Das
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?!^0*$)(?!^0*\.0*$)^\d{1,10}(\.\d{1,2})?$ |
| Description |
To validate a number of 10 digits before the decimal point and atmost 2 digits after it |
| Matches |
12314 12314.2 12314.32 |
| Non-Matches |
12314.212 12123.222 |
| Author |
Rating:
Not yet rated.
Nilarka Prasanna Das
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?!^0*$)(?!^0*\.0*$)^\d{1,10}(\.\d{1,2})?$ |
| Description |
To validate a number of 10 digits before the decimal point and atmost 2 digits after it |
| Matches |
12314 12314.2 12314.32 |
| Non-Matches |
12314.212 12123.222 |
| Author |
Rating:
Not yet rated.
Nilarka Prasanna Das
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?!^0*$)(?!^0*\.0*$)^\d{1,10}(\.\d{1,2})?$ |
| Description |
To validate a number of 10 digits before the decimal point and atmost 2 digits after it |
| Matches |
12314 12314.2 12314.32 |
| Non-Matches |
12314.212 12123.222 |
| Author |
Rating:
Not yet rated.
Nilarka Prasanna Das
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?!^0*$)(?!^0*\.0*$)^\d{1,10}(\.\d{1,2})?$ |
| Description |
To validate a number of 10 digits before the decimal point and atmost 2 digits after it |
| Matches |
12314 12314.2 12314.32 |
| Non-Matches |
12314.212 12123.222 |
| Author |
Rating:
Not yet rated.
Nilarka Prasanna Das
|
| Title |
Test
Details
Percentage
|
| Expression |
Percentage allowing upto 4 places of decimal |
| Description |
(?!^0*$)(?!^0*\.0*$)^\d{1,2}(\.\d{1,4})?$ |
| Matches |
99 12.1 77.25 76.125 |
| Non-Matches |
101 100.1 101.25 106.125 |
| Author |
Rating:
Nilarka Prasanna Das
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^[1-9][0-9]{3}\s?[a-zA-Z]{2}$ |
| Description |
Validates Dutch Postal Codes (ZipCode). There was a previous one listed here, but it's not entirely correct. Namely that dutch postal codes can contain a zero but cannot start with one, so this one is the adjusted version. |
| Matches |
1234AB | 1234 AB | 1001 AB |
| Non-Matches |
0123AB | 1234A B | 0123 AB |
| Author |
Rating:
Jos Krause
|
| Title |
Test
Details
dds
|
| Expression |
sdsd |
| Description |
sdsd |
| Matches |
sdsd |
| Non-Matches |
sdsd |
| Author |
Rating:
alal
|
| 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 |
^([GB])*(([1-9]\d{8})|([1-9]\d{11}))$ |
| Description |
Simple check of valid UK VAT Registration numbers. The standard format for UK VAT number must be 9 characters long or 12 characters if a branch trader. The GB prefix has been included as optional, but technically you should include it. The UK VAT format also includes Government Departments and Health Authorities, but I have excluded them for the moment. |
| Matches |
123456789 | GB123456789 | GB123456789123 |
| Non-Matches |
dfddf | 3443443 | 34 34 3344 |
| Author |
Rating:
Not yet rated.
Ben Powell
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^\+?972(\-)?0?[23489]{1}(\-)?[^0\D]{1}\d{6}$ |
| Description |
Matches an israely phone number with country code. With or without the plus sign. Also allows two or one digit in city code. Checks for a valid city code (02,03,04,08,09) |
| Matches |
+972-4-8253055 | 972-4-8615466 | 972-04-8564521 |
| Non-Matches |
04-5487665 | 05-455665545 | 456884624 |
| Author |
Rating:
Alex Hazanov
|
| Title |
Test
Details
uploaded.to Downloadlink
|
| Expression |
http://(?:www\.|)uploaded\.to/\?id=[a-z0-9]{6} |
| Description |
Downloadlinks of the 1-Click-Hoster uploaded.to |
| Matches |
http://www.uploaded.to/?id=123456;http://uploaded.to/?id=abcdef |
| Non-Matches |
http://www.uploaded.to/?id=12345678;uploaded.to/?id=123456 |
| Author |
Rating:
Not yet rated.
dasnov
|
| Title |
Test
Details
Match PCRE Modifiers (At Least in PHP)
|
| Expression |
/[^imsxeADSUXu]([imsxeADSUXu]*)$/ |
| Description |
This matches the modifiers section of a properly formed PCRE RegEx (at least in PHP). This of course assumes that the delimiters are not any of the modifiers letters, if that's even possible. |
| Matches |
/asher/is | /(a|the)\spattern/imxe |
| Non-Matches |
/pattern/mjhlk |
| Author |
Rating:
Asher Holley
|
| Title |
Test
Details
Curl apostrophes
|
| Expression |
'([dmstrl])([ .,?!\)\\/<]) |
| Description |
Find apostrophes in text.
I use this to curl them, by replacing the above with this expression:
’$1$2 |
| Matches |
it's |they'll |we're,|I'd! |
| Non-Matches |
its| were| He said 'Hello'. |
| Author |
Rating:
Not yet rated.
Nabha
|
| Title |
Test
Details
Check filename extensions
|
| 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. This is a better solution (I think) than #343. Works in Javascript and C#. |
| Matches |
thisfile.mp3 | tH@tfile.wma |
| Non-Matches |
whatever.exe | somethingelse.mpa | thisagain.wm3 | filenamemp3 | filename..mp3 | filename.wmap3 |
| Author |
Rating:
Dusan Hlavaty
|
| Title |
Test
Details
CURP (Mexican Code)
|
| Expression |
^[a-zA-Z]{4}\d{6}[a-zA-Z]{6}\d{2}$ |
| Description |
Simple Expression to evaluate a Mexican CURP Code |
| Matches |
LKHL675728KJDFFD99 | RESL720319HSRYNS00 | RESX720999HSRYNS00 |
| Non-Matches |
123LKHL675728KJDFFD99 | RESL720319HSRYANS00 | RESX720999HSRYNS000 |
| Author |
Rating:
Jose Luis Reyes
|
| Title |
Test
Details
RFC (Mexican Code)
|
| Expression |
^[A-Za-z]{3,4}[0-9]{6}$ |
| Description |
Mexican RFC code without Homonimia or separators |
| Matches |
aBC999999 | RESL720319 | rerl000123 |
| Non-Matches |
abc-999999 | abc 999999 | ABCD 999999 |
| Author |
Rating:
Not yet rated.
Jose Luis Reyes
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(?=(?:[^\']*\'[^\']*\')*(?![^\']*\')) |
| Description |
This exp will parse out space delimited strings with consideration to single quotes. I use it with SQL statements. |
| Matches |
BETWEEN '11/1/2004' AND '12/1/2004 11:59:59 PM' |
| Non-Matches |
flabberguasted |
| Author |
Rating:
Not yet rated.
Scott Richardson
|
| Title |
Test
Details
Cleaning HTML
|
| Expression |
<\/{0,1}(?!\/|b>|i>|p>|a\s|a>|br|em>|ol|li|strong>)[^>]*> |
| Description |
following a bit of work this morning trying to get something to strip out arbitrary html but leave 'known' tags in place, we have come up with the following which may be useful. This uses the 'negative lookahead' construct using '?!' It looks for an angle bracket and perhaps a backslash, as long as it is *not* followed by one of the terms in the ?! section. The brackets in this section do not return a value, they are part of the construct. This regexp can therefore be used to replace all unknown tags with blanks. Obviously you can add other 'good' html tags to the list. |
| Matches |
<table>...</table> |
| Non-Matches |
blah blah blah. |
| Author |
Rating:
Gordon Buxton
|
Displaying page
of
pages;
Items to