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:
/]*>([^<]*mylink[^<]*)<\/a>/
it's a bit simplistic, as it will break if tags are inside the link (xyz mylink aaa
), but it should work.