Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
<a[a-zA-Z0-9 ="'.:;?]*(name=){1}[a-zA-Z0-9 ="'.:;?]*\s*((/>)|(>[a-zA-Z0-9 ="'<>.:;?]*</a>))
|
Description |
This expression matches only valid html anchors. Those are anchors with an attribute name=. Such anchor can be closed either with </a> or with />.
If someone can help - one thing still missing is not matching html tags with parameter href, becazse such should be considered as non valid anchors.
|
Matches |
<a name="anchorName">Anchor</a> | <a name=anchorName />
|
Non-Matches |
<a href="somewhere"> | <a href> | <a name />
|
Author |
Rating:
Aleš Potocnik
|
Title |
Test
Details
Pattern Title
|
Expression |
<a[a-zA-Z0-9 ="'.?_/]*(href\s*=\s*){1}[a-zA-Z0-9 ="'.?_/]*\s*((/>)|(>[a-zA-Z0-9 ="'<>.?_/]*</a>))
|
Description |
An expression that matches all XHTML valid hrefs (links). It even alows spaces like href = "href...", dough this is not quite XHTML valid. It finds only hrefs but not for instance anchors. If you need to find only anchors, replace "href" within expression with "name" and thats it.
|
Matches |
<a href="www.google.com">Google</a> | <a href=www.google.com /> | <a
|
Non-Matches |
<a name="anchor">Anchor</a> | <img src="image.gif">
|
Author |
Rating:
Aleš Potocnik
|
Displaying page
of
pages;
Items to