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 9 of 9 pages; Items 161 to 173
Title Test Details Pattern Title
Expression
\w?<\s?\/?[^\s>]+(\s+[^"'=]+(=("[^"]*")|('[^\']*')|([^\s"'>]*))?)*\s*\/?>
Description
Matches tags
Matches
<world www="hello" />
Non-Matches
<>>>world www="hello" />
Author Rating: Not yet rated. Darren Neimke
Title Test Details Pattern Title
Expression
@{2}((\S)+)@{2}
Description
This will match results in a template situation. For example: template reads Dear @@[email protected]@, .... would become Dear John, If you dont want to use the @@ change the @ to what ever characters you want.
Matches
Non-Matches
Author Rating: Not yet rated. john hamman
Title Test Details Pattern Title
Expression
^\d{3,3}\.\d{0,2}$|^E\d{3,3}\.\d{0,2}$
Description
ICD9 code pattern
Matches
E123. | 123.0 | 045.23
Non-Matches
b123. | 3456.0
Author Rating: Not yet rated. Zeljko Stanfel
Title Test Details Pattern Title
Expression
&lt;[aA][ ]{0,}([a-zA-Z0-9&quot;'_,.:;[email protected]$&amp;()%=/ ]|[-]|[ \f]){0,}&gt;((&lt;(([a-zA-Z0-9&quot;'_,.:;[email protected]$&amp;()%=/ ]|[-]|[ \f]){0,})&gt;([a-zA-Z0-9&quot;'_,.:;[email protected]$&amp;()%=/ ]|[-]|[ \f]){0,})|(([a-zA-Z0-9&quot;'_,.:;[email protected]$&amp;()%=/ ]|[-]|[ \f]){0,})){0,}
Description
I wrote this sweet little (well, not so little really) reg to extract links from an HTML source.... it is very robust, give it a try. The only limitation I have discovered is that it can't match invalid HTML...
Matches
&lt;a href='javascript:functionA();'&gt;&lt;i&gt;this text is italicized&lt;/i&gt;&lt;/a&gt;
Non-Matches
&lt;A href='#'&gt;&lt;P&lt;/A&gt;&lt;/P&gt;
Author Rating: Not yet rated. Brian Webb
Title Test Details Pattern Title
Expression
^[0-9A-Za-z_ ]+(.[jJ][pP][gG]|.[gG][iI][fF])$
Description
Matches HTML image leaf filenames.
Matches
good.gif | go d.GIf | goo_d.jPg
Non-Matches
junk | bad.bad.gif | slash\gif.
Author Rating: Not yet rated. Geoffrey Swenson
Title Test Details Pattern Title
Expression
^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$
Description
Regular expression to match valid UK postcodes. In the UK postal system not all letters are used in all positions (the same with vehicle registration plates) and there are various rules to govern this. This regex takes into account those rules. Details of the rules: First half of postcode Valid formats [A-Z][A-Z][0-9][A-Z] [A-Z][A-Z][0-9][0-9] [A-Z][0-9][0-9] [A-Z][A-Z][0-9] [A-Z][A-Z][A-Z] [A-Z][0-9][A-Z] [A-Z][0-9] Exceptions Position - First. Contraint - QVX not used Position - Second. Contraint - IJZ not used except in GIR 0AA Position - Third. Constraint - AEHMNPRTVXY only used Position - Forth. Contraint - ABEHMNPRVWXY Second half of postcode Valid formats [0-9][A-Z][A-Z] Exceptions Position - Second and Third. Contraint - CIKMOV not used
Matches
DN3 6GB | SW42 4RG | GIR 0AA
Non-Matches
SEW4 5TY | AA2C 4FG | AA2 4CV
Author Rating: Not yet rated. Stuart Wade
Title Test Details Pattern Title
Expression
{.*}
Description
Simple, but it gave me trouble in the c#...
Matches
{User}, thank you for submitting a new project request!
Non-Matches
Thank you for submitting a new project request!
Author Rating: Not yet rated. scott cole
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
(([01][\.\- +]\(\d{3}\)[\.\- +]?)|([01][\.\- +]\d{3}[\.\- +])|(\(\d{3}\) ?)|(\d{3}[- \.]))?\d{3}[- \.]\d{4}
Description
167 different US telephone patterns. Options includes a)0 or 1 dial, b)area code, c).+-()space between number dial-area code-number.
Matches
1 (999) 999 9999 | 999 999 9999 | 999 9999
Non-Matches
19999999999 | 9999999999 | 9999999
Author Rating: Not yet rated. Dennis Zweigle
Title Test Details Pattern Title
Expression
(^[A-ZÀ-Ü]{1}[a-zà-ü']+\s[a-zA-Zà-üÀ-Ü]+((([\s\.'])|([a-zà-ü']+))|[a-zà-ü']+[a-zA-Zà-üÀ-Ü']+))
Description
Checks if has the first and the last name, and check the capital letters. Use with the RegExp.test method
Matches
Carlos Rodrigues | Cá de Laaa | Crras R. L. Rodrigües
Non-Matches
aaäA
Author Rating: Not yet rated. Carlos R. L. Rodrigues
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 | %/&amp;89uhuhadjkh | &quot;hi there!&quot;
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][-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 &lt;= 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
Change page:   |    Displaying page 9 of 9 pages; Items 161 to 173

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