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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 8
Title Test Details Pattern Title
Expression
<!--[\s\S]*?-->
Description
Removes pesky comments and commented javascript from HTML
Matches
<!-- comments --> | <!-- x = a > b - 3 -->
Non-Matches
<COMMENTS>this is a comment</COMMENTS>
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
</?(\w+)(\s+\w+=(\w+|"[^"]*"|'[^']*'))*>
Description
Finds any HTML tag and sub-matches properties weather it has an apposterphee, quote, or no quote/apposterphee
Matches
<TD> | <TD bgColor="FFFFFF"> | </TD>
Non-Matches
No Tag Here ...
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
^\{?[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}\}?$
Description
Validates a GUID with and without brackets. 8,4,4,4,12 hex characters seperated by dashes.
Matches
{e02ff0e4-00ad-090A-c030-0d00a0008ba0} | e02ff0e4-00ad-090A-c030-0d00a0008ba0
Non-Matches
0xe02ff0e400ad090Ac0300d00a0008ba0
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
</?([a-zA-Z][-A-Za-z\d\.]{0,71})(\s+(\S+)(\s*=\s*([-\w\.]{1,1024}|"[^"]{0,1024}"|'[^']{0,1024}'))?)*\s*>
Description
Searches for tags and there atributes according to the HTML 2.0 specification to limit length of tags to 72 characters, and length of attribute values to 1024 characters.
Matches
<IMG src='stars.gif' alt="space" height=1>
Non-Matches
this is not a tag
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
<[a-zA-Z][^>]*\son\w+=(\w+|'[^']*'|"[^"]*")[^>]*>
Description
Find HTML tags that have javascript events attached to them.
Matches
<IMG onmouseover="window.close()">
Non-Matches
<IMG src="star.gif">
Author Rating: The rating for this expression. Lewis Moten
Title Test Details Pattern Title
Expression
^[-\w`~!@#$%^&amp;*\(\)+={}|\[\]\\:&quot;;'&lt;&gt;?,.\/ ]*$
Description
Make sure string only contains characters that appear on keyboard. Extended characters (such as those with ascii values above 127), will not pass the test.
Matches
My@Password!! | Lewis Moten
Non-Matches
&#176;&#177;&#178;¦¦
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
^[A-Z].*$
Description
Test string to verify it begins with an upper-case letter.
Matches
Lewis | Edward | Moten
Non-Matches
lewis | 1moten | @home
Author Rating: Not yet rated. Lewis Moten
Title Test Details Pattern Title
Expression
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*
Description
Validates 1 or more email addresses. Email addresses can be delimited with either comma or semicolon. White space is allowed after delimiter, but not necessary. I needed this to allow my users to specify multiple email addresses if they choose to do so.
Matches
lewis@moten.com | lewis@moten.com, me@lewismoten.com | lewis@moten.com;me@lewismoten.com
Non-Matches
lewis@@moten.com
Author Rating: The rating for this expression. Lewis Moten
   Displaying page 1 of 1 pages; Items 1 to 8

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