I'm kinda of a novice when it comes to using Regex
and I've kinda stumbled upon some issues. I'm trying to get the text that's inside the href
of a link.
This is what I've come up so far
/\w+(?=")/g
And these are the strings I'm testing it on:
<a target="_blank" href="fdsfsd">fdsfs</a>
<a href="mdosfsd"></a>
<link href="f89sdfsd" />
Right now it returns any text that's inside a "", but I don't know how can I select if there's more to that "" in this case if it's a href
and if this href
is part of <a>