Title |
Test
Find
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.:
<A 1>
<A 2>
<A 2>dfgdfg</A>
</A>
<Z></Z>
</A>
<A 3>
</A>
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:
Lars Echterhoff
|
Source |
|
Your Rating |
|
Title: table patttren
Name: Sachin Sapkota
Date: 12/29/2006 6:46:56 AM
Comment:
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.