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 5
Title Test Details Pattern Title
Expression
(<[^>]*?tag[^>]*?(?:identify_by)[^>]*>)((?:.*?(?:<[ \r\t]*tag[^>]*>?.*?(?:<.*?/.*?tag.*?>)?)*)*)(<[^>]*?/[^>]*?tag[^>]*?>)
Description
This Pattern matches a HTML like tag and its closing tag without any childtags, that was identified by an attribute or anything identifiable (?) mark inside the opening tag. Look for A as Tag and 1 ans identifier. A greedy expression woulds usualy end at the A 2 closing tag, non-greedy will probably end at the A 3 end tag. e.g.: &lt;A 1&gt; &lt;A 2&gt; &lt;A 2&gt;dfgdfg&lt;/A&gt; &lt;/A&gt; &lt;Z&gt;&lt;/Z&gt; &lt;/A&gt; &lt;A 3&gt; &lt;/A&gt; Returns: 0 Full Match 1 Whole starttag 2 Content inside the tag 3 Whole endtag P.S.: I use it in a parser, to find tags and add code to them, without to know the code, the content or any further infomation.
Matches
<tag name="identify_by">jskdfjkfb</tag>
Non-Matches
have a look at the description.
Author Rating: The rating for this expression. Lars Echterhoff
Title Test Details Pattern Title
Expression
(?:[\w]*) *= *"(?:(?:(?:(?:(?:\\\W)*\\\W)*[^"]*)\\\W)*[^"]*")
Description
This Pattern matches HTML attributes with quoted quotes or other non-word characters correctly. I used it in an parser-engine. Replace the quotes in this RX to match other boundaries.
Matches
<HTMLTAG onClick="jsfunc(\"foo\")">
Non-Matches
<HTMLTAG onClick sometext>
Author Rating: The rating for this expression. Lars Echterhoff
Title Test Details Pattern Title
Expression
(?:(?:http|https)://(?:(?:[^/&=()/§, ]*?)*\.)+(?:\w{2,3})+?)(?:/+[^ ?,'§$&()={\[\]}]*)*(?:\?+.*)?$
Description
I don't give a f*** to the RFC, fix it yourself for RFC, I just need a valid webresource location. So add forbidden characters as you need them in the character classes or use it as it is. This RegEx is not for searching valid URLs, just for validating. Look at the trailing $.
Matches
http://www.test.org | http://www.test.org/page1 | http://www.test.org/folder/subfolder/page.html?get
Non-Matches
http://www.test.org% | http://www.test.org/hgh(s/ | http://www.test.org/hehe/notallowed&/page1.h
Author Rating: The rating for this expression. Lars Echterhoff
Title Test Details German numerical Strings w & w/o interpunctation
Expression
(?:^(?:-)?(?:\d{1,3}\.(?:\d{3}\.)*\d{3})(?:\,\d+)?$|^(?:-)?\d*(?:\,\d+)?$)
Description
This validation forces a value wheter to be strict niced or plain input of a numerical value. The separation per thousand should be a (.) dot and must be used exactly or never to be valid. Currently this RX validates german formed values... Just switch \, with \. and vice versa to get valid US results.
Matches
10000|12.123|5.123,000|,001|1.000.000|1,00
Non-Matches
1.0000|12.12.00|5,123.000|.001|1,000,000|1.00
Author Rating: Not yet rated. Lars Echterhoff
   Displaying page 1 of 1 pages; Items 1 to 5

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