I'm trying to match a specific item in a string using a flavor of JavaScript regex that allows lookbehinds, but I believe I am messing up the lookarounds, possibly in the nesting of them or I'm using the wrong lookarounds altogether.
Here is the regex I have put together so far:
(?<=<a class="" href="/voice/m/contact/(?=\S*?))([\s\S]*?)(?=</a>)
Here is a snippet of the string I am trying to pull the match from:
<b>
<a class="" href="/voice/m/contact/dhbte4tgsbhh65u6">Name</a>
</b>
In the above example, the regex is matching dhbte4tgsbhh65u6">Name
when I want it to match Name
. I somehow need it to not include the dhbte4tgsbhh65u6">
which is being matched by (?=\S*?)
.
How can I fix my regex to do what I need?