Hi, I am looking for a regular expression in PHP which would match the anchor with a specific text on it. E.g I would like to get anchors with text mylink like:
<a href="blabla" ... >mylink</a>
So it should match all anchors but only if they contain specific text So it should match these strings:
<a href="blabla" ... >mylink</a>
<a href="blabla" ... >blabla mylink</a>
<a href="blabla" ... >mylink bla bla</a>
<a href="blabla" ... >bla bla mylink bla bla</a>
but not this one:
<a href="blabla" ... >bla bla bla bla</a>
Because this one does not contain word mylink.
Also this one should not match: "mylink is string"
because it is not an anchor.
Anybody any Idea?
Thanx Granit