Infra Stank Infra Stank - 1 year ago 110
Javascript Question

JS Regex to find href of several a tags

I need a regex to find the contents of the hrefs from these a tags :

<p class="bc_shirt_delete">
<a href="/CustomContentProcess.aspx?CCID=13524&amp;OID=3936923&amp;A=Delete" onclick="javascript:return confirm('Are You sure you want to delete this item?')">delete</a>

Just the urls, not the href/ tags.

I'm parsing a plain text ajax request here, so I need a regex.

Answer Source

You can try this regex:


Example at:

Update: or easier via non greedy method:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download