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 13
Title Test Details HTML HEX Characters codes
Expression
&#x((?=.*[ABCDEF]))*((?=.*[0-9]))*.{2,5};
Description
This pattern matches any HTML character code in hexadecimal format. Doesn't match numerical code such as Ë or any friendly code character such as  
Matches
Ǟ đ Ê
Non-Matches
Ë Ê
Author Rating: Not yet rated. Roberto Santana
Title Test Details HTML Special Characters codes
Expression
&[a-zA-Z]+\d{0,3};
Description
This pattern matches any HTML special character code in the knowed friendly-code.
Matches
à Ñ   ¼
Non-Matches
ŷ ỳ Ż
Author Rating: Not yet rated. Roberto Santana
Title Test Details HTML Characters numerical codes
Expression
&#\d{2,5};
Description
This pattern matches any HTML special character in numerical code.
Matches
A đ ḋ
Non-Matches
ð è  
Author Rating: Not yet rated. Roberto Santana
Title Test Details HTML Tags
Expression
</?[a-z][a-z0-9]*[^<>]*>
Description
Mathes any HTML tag with any parameters. Very useful to clean HTML of a text.
Matches
&lt;tr style="height: 1px; background-color: #ffffff"&gt; &lt;td colspan="4"&gt; &lt;/br&gt;
Non-Matches
Any other text outside a tag symbols &lt; &gt;
Author Rating: Not yet rated. Roberto Santana
Title Test Details Password complexity
Expression
(?=[-_a-zA-Z0-9]*?[A-Z])(?=[-_a-zA-Z0-9]*?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])[-_a-zA-Z0-9]{6,}
Description
Tests if the input consists of 6 or more letters, digits, underscores and hyphens. The input must contain at least one upper case ltter, one lower case letter and one digit.
Matches
M0_k3y Pa-sW0rd S1mPl3
Non-Matches
MonKey PassWord simple
Author Rating: The rating for this expression. Roberto Santana
Title Test Details HTML Tags and Comments
Expression
<!*[^<>]*>
Description
Mathes any HTML tag with any parameters and HTML Comments. Very useful to clean HTML of a text.
Matches
&lt;tr style="height: 1px; background-color: #ffffff"&gt; &lt;td colspan="4"&gt; &lt!-- comment --&gt; &lt;!DOCTYPE html PUBLIC ... &gt;
Non-Matches
Any other text outside a tag symbols &lt; &gt;
Author Rating: Not yet rated. Roberto Santana
Title Test Details Pseudo-HTML, Gets a Tag based on [] nomeclature. "b" Tag in this case
Expression
(\[b\])([^\[\]]+)(\[/b\])
Description
Checks only for valid ones. Always in lowercase. Separated Tags and contents in three groups for useful handling.
Matches
[b]this is important[/b]
Non-Matches
[b]this is important[b]
Author Rating: Not yet rated. Roberto Santana
Title Test Details Pseudo-HTML, Gets Tags based on [] nomeclature. Allowed: [a], [b], [i], [u] Tag in this case
Expression
(\[[abiu][^\[\]]*\])([^\[\]]+)(\[/?[abiu]\])
Description
Only matches well-constructed tags.
Matches
[b]important[/b]; [i]italic[/i]; [u]underlined[/u]
Non-Matches
[b]important[b]; [i class="example"]italic[/i]; [u ]underlined[/u]
Author Rating: Not yet rated. Roberto Santana
Title Test Details Pseudo-HTML, Gets [a] Tag based on [] nomeclature with url parameter
Expression
(\[a url=\"[^\[\]\"]*\"\])([^\[\]]+)(\[/a\])
Description
Matches well-formed tags.
Matches
[a url="http://www.example-domain.com"]link text[/a]; [a url=""]link text[/a]
Non-Matches
[a]link text[/a]; [a url= ""]link text[/a]
Author Rating: Not yet rated. Roberto Santana
Title Test Details Gets an HTML parameter value of a given Tag. url in this case.
Expression
url=\"([^\[\]\"]*)\"
Description
Very useful to get a value, Value is in a capture group for best handling.
Matches
url=""; url="http://www.example.eu"; url="ftp://ftp.example.com"
Non-Matches
url =""; url = ""
Author Rating: Not yet rated. Roberto Santana
Title Test Details Counts the number of words in a text
Expression
\b\w+\b
Description
This small regex is useful to count the number of words of a text.
Matches
any text
Non-Matches
not a text
Author Rating: Not yet rated. Roberto Santana
Title Test Details Matches a simple HTML Tag in capturing groups
Expression
(<b>)([^<>]+)(</b>)
Description
Gets simple tags without parameters
Matches
<b>important</b>; <b>anything that should be in bold</b>
Non-Matches
<b >important</b>; <b>important<b>
Author Rating: Not yet rated. Roberto Santana
Title Test Details Matches any HMTL tag open or close
Expression
(</?\w*[^<>]*>)
Description
Very useful to detect if there are pieces of HMTL in a text
Matches
&lt;td width="382"&gt;; &lt;tr style="height: 1px; background-color: #ffffff"&gt;; &lt;/a&gt;
Non-Matches
this_is_not_a_tag; [a>;
Author Rating: Not yet rated. Roberto Santana
   Displaying page 1 of 1 pages; Items 1 to 13

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