First off here's the current regex
Code: Select all
$linkPattern = '/<a[\s]+[^>]*?href[\s]?=[\s\"\']+(.*?)[\"\']+.*?>([^<]+|.*?)?<\/a>/mi';However, today a new test was suggested (one stupidly overlooked) and it failed miserably. I was hoping you guys could help suggest a fix.
If
Code: Select all
<a href="http://your/link/here">Click</a>if
Code: Select all
<a href="http://your/link/here">
<any other html tag>
Click
</close any tag>
</a>I have a basic grasp of regex, but to be honest I don't think this is one of mine. I'm now the only dev on the project so looking forward to suggestions and many thanks in advance to any one who can help.