- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
(<[^>]*?tag[^>]*?(?:identify_by)[^>]*>)((?:.*?(?:<[ \r\t]*tag[^>]*>?.*?(?:<.*?/.*?tag.*?>)?)*)*)(<[^>]*?/[^>]*?tag[^>]*?>)
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.
<tag name="identify_by">jskdfjkfb</tag>
have a look at the description.
Author Rating: The rating for this expression. Lars Echterhoff
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: table patttren
Name: Sachin Sapkota
Date: 12/29/2006 6:46:56 AM
There it seem is ambiguity with the number of tables in a html page while scrapping a site's content. Because there are more than one <table> ....................</table> tags in a single page. I cannot scrap a page.PLEASE SUGGEST.

Copyright © 2001-2018, | ASP.NET Tutorials