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 7 of 9 pages; Items 121 to 140
Title Test Details Pattern Title
Expression
^[A-Z]{2}[0-9]{6}[A-DFM]{1}$
Description
UK National Insurance Number (NINO) validation. (The following modifications have been made: Only A to D are permitted as the last letter, and all letters should be in uppercase. For temporary numbers F and M are permitted for female and male holders.)
Matches
AB123456D | AB123456F | AB123456M
Non-Matches
AB123456E | ab123456d
Author Rating: Not yet rated. Peter Whyte
Title Test Details Pattern Title
Expression
(\{\\f\d*)\\([^;]+;)
Description
This pattern returns the font section from an RTF document. The first parenthetical subexpression captures the font number, the second returns the actual font enumeration. Lame-o, but fun! :-)
Matches
{\f0\Some Font names here; | {\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial; | {\f
Non-Matches
{f0fs20 some text}
Author Rating: Not yet rated. Joel Dooris
Title Test Details Pattern Title
Expression
(("|')[a-z0-9\/\.\?\=\&]*(\.htm|\.asp|\.php|\.jsp)[a-z0-9\/\.\?\=\&]*("|'))|(href=*?[a-z0-9\/\.\?\=\&"']*)
Description
Will locate an URL in a webpage. It'll search in 2 ways - first it will try to locate a href=, and then go to the end of the link. If there is nu href=, it will search for the end of the file instead (.asp, .htm and so on), and then take the data between the "xxxxxx" or 'xxxxxx'
Matches
href="produktsida.asp?kategori2=218" | href="NuclearTesting.htm"
Non-Matches
U Suck
Author Rating: Not yet rated. Henric Rosvall
Title Test Details Pattern Title
Expression
<[^>\s]*\bauthor\b[^>]*>
Description
This expression will match the corresponding XML/HTML elements opening and closing tags. Useful to handle documents fragments, without loading an XML DOM.
Matches
<author name="Daniel"> | </sch:author> | <pp:author name="Daniel"
Non-Matches
<other> | </authors> | <work>author</work>
Author Rating: Not yet rated. Daniel Cazzulino
Title Test Details Pattern Title
Expression
^[A-Z]{1,2}[1-9][0-9]?[A-Z]? [0-9][A-Z]{2,}|GIR 0AA$
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. Modifications: 1) Doesn't allow leading zeros in first part (outward) eg BT01 3RT is incorrect; it should be BT1 3RT. 2) Only allows uppercase letters, which is the preference of the UK Post Office. 3) Permits the only postcode to break the rules - GIR 0AA (for the old Girobank, now Alliance & Leicester bank, address)
Matches
G1 1AA | GIR 0AA | SW1 1ZZ
Non-Matches
BT01 3RT | G111 1AA
Author Rating: Not yet rated. Peter Whyte
Title Test Details Pattern Title
Expression
@{2}((\S)+)@{2}
Description
This will match results in a template situation. For example: template reads Dear @@Name@@, .... would become Dear John, If you dont want to use the @@ change the @ to what ever characters you want.
Matches
@@test@@ | @@name@@ | @@2342@@
Non-Matches
@test@ | @@na me@@ | @@ name@@
Author Rating: Not yet rated. john hamman
Title Test Details Pattern Title
Expression
^([0-1]([\s-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s-./\\])?(\d{3}([\s-./\\])?\d{4}|[a-zA-Z0-9]{7})$
Description
It checks for Valid US Phone numbers. Accepts ".",Space,\,/,- as delim.
Matches
1.222.333.1234 | 1-223-123-1232 | 12223334444
Non-Matches
1.1.123123.123 | 12-1322-112-31 | 11231321131
Author Rating: Not yet rated. Amit Deshpande
Title Test Details Pattern Title
Expression
^([0-1]([\s-./\\])?)?(\(?[2-9]\d{2}\)?|[2-9]\d{3})([\s-./\\])?([0-9]{3}([\s-./\\])?[0-9]{4}|[a-zA-Z0-9]{7}|([0-9]{3}[-][a-zA-Z0-9]{4}))
Description
USA Alhpanumeric Valid Phone numbers
Matches
1.222.333.1234 | 1-223-123-1232 | 1-888-425-DELL
Non-Matches
1.1.123123.123 | 12-1322-112-31 | 1-800-CALL-DEL
Author Rating: Not yet rated. Amit Deshpande
Title Test Details Pattern Title
Expression
((?<strElement>(^[A-Z0-9-;=]*:))(?<strValue>(.*)))
Description
Usesful for importing vcards. Matches vcard elements and values.
Matches
BEGIN: | TEL;WORK;VOICE: | TEL:
Non-Matches
begin: | TEL;PREF;
Author Rating: Not yet rated. Karsten Grombach
Title Test Details Pattern Title
Expression
^&lt;a\s+href\s*=\s*&quot;http:\/\/([^&quot;]*)&quot;([^&gt;]*)&gt;(.*?(?=&lt;\/a&gt;))&lt;\/a&gt;$
Description
Regexp to find all external links in a HTML string. Can easily be modified to handle all/other links/protocols (like file/https/ftp). Uses lookahead assertions and non-greedy modifier to check for the end &lt;/a&gt; but still allow html tags inbetween start and end A tag. Takes into account that there could be linebreaks and other nasty whitespace chars in the middle of the tag. I am using it to find all external links in embedded HTML code and change 1.the target of the link 2.insert a &quot;Leaving Site&quot; logo to illustrate you are leaving site.
Matches
&lt;a href=&quot;http://www.mysite.com&quot;&gt;my external link&lt;/a&gt; | &lt;a href=&quot;http:/
Non-Matches
&lt;a href=&quot;myinternalpage.html&quot;&gt;my internal link&lt;/a&gt;
Author Rating: Not yet rated. Anders Rask
Title Test Details Pattern Title
Expression
\({1}[0-9]{3}\){1}\-{1}[0-9]{3}\-{1}[0-9]{4}
Description
Matches
(111)-111-1111
Non-Matches
11111111111
Author Rating: Not yet rated. s4 s
Title Test Details Pattern Title
Expression
^(/w|/W|[^<>+?$%{}&])+$
Description
simple expression for excluding a given list of characters. simply change the contents of [^] to suite your needs. for example ^(/w|/W|[^&lt;&gt;])+$ would allow everything except the characters &lt; and &gt;.
Matches
John Doe Sr. | 100 Elm St., Suite 25 | Valerie's Gift Shop
Non-Matches
<h1>Hey</h1>
Author Rating: Not yet rated. Glenn Caccia
Title Test Details Pattern Title
Expression
^(ac|AC|al|AL|am|AM|ap|AP|ba|BA|ce|CE|df|DF|es|ES|go|GO|ma|MA|mg|MG|ms|MS|mt|MT|pa|PA|pb|PB|pe|PE|pi|PI|pr|PR|rj|RJ|rn|RN|ro|RO|rr|RR|rs|RS|sc|SC|se|SE|sp|SP|to|TO)$
Description
Valida os todos Estados Brasileiros (UF) e o distrito Federal
Matches
AC | RJ | SP
Non-Matches
XX | AB | HJ
Author Rating: Not yet rated. Fernando Cerqueira
Title Test Details Pattern Title
Expression
^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$
Description
Postcode check for Spain
Matches
12345 | 10234 | 01234
Non-Matches
00123
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
(^\d{5}-\d{3}|^\d{2}.\d{3}-\d{3}|\d{8})
Description
Validar o do CEP Brasileiro com 8 posicoes podendo usar mascara . e - ou somente numeros
Matches
12.345-678 | 12345-678 | 12345678
Non-Matches
12.345678 | 12345-1 | 123
Author Rating: Not yet rated. Fernando Cerqueira
Title Test Details Pattern Title
Expression
^[1-9]{1}[0-9]{3}$
Description
Postcode for Belgium
Matches
1234
Non-Matches
123 | 123A
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
Description
Postcode check for France (including colonies) ----- Edited; sorry I didn't know about Corsica, no offense :)
Matches
12345 | F-12345 | F-2B100
Non-Matches
F12345 | F-123456 | 123456
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}
Description
Checks whether the string specified is in the same format as the UK postcode format defined on: http://www.magma.ca/~djcl/postcd.txt It allows: A = Letter N = Number AN NAA, ANA NAA, ANN NAA, AAN NAA, AAA NAA (rare), AANN NAA, AANA NAA It gives the option to have the two parts of the uk postcode to be separated by a space or a hyphen. (restriction is set to all-capitals)
Matches
AA11 1AA | AA1A 1AA | A11-1AA
Non-Matches
111 AAA | 1AAA 1AA | A1AA 1AA
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^((0?[1-9])|((1|2)[0-9])|30|31)$
Description
matches any day of month 0?1-31
Matches
01 | 12 | 31
Non-Matches
123 | 32 | abc
Author Rating: Not yet rated. Serafeim Zanikolas
Title Test Details Pattern Title
Expression
^0[23489]{1}(\-)?[^0\D]{1}\d{6}$
Description
Regular Expression that validate a phone number inside israel.
Matches
03-6106666 | 036106666 | 02-5523344
Non-Matches
00-6106666 | 03-0106666 | 02-55812346
Author Rating: Not yet rated. Al Val
Change page:   |    Displaying page 7 of 9 pages; Items 121 to 140

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