I'm trying to match and replace anchor tags using a regex. What i have so far is this:
"(<a href=['\"]?([\\w_\\.]*)['\"]?)"
The problem with this approach is that it fails to capture hrefs that also have # in their value. I've tried
"(<a href=['\"]?([\\w_\\.#]*)['\"]?)"
and
"(<a href=['\"]?([\\w_\\.\\#]*)['\"]?)"
with no success.
What am i doing wrong?
Thank you