-
regex help
Hi,
I need to replace:
<a href="http://xxxxx/asdfasdf/#anchor" class="relativePath">Name</a>
with
<a href="#anchor" class="relativePath">Name</a>
If 'class="relativePath"' is between '<a' and '</a>'
I don't expect people here to be my regex writers - but don't know where to start.
Any clues?
Thanks,
-
The first part :
if(pgreg_match('/<a [^>]*class="relativePath"[^>]*>/'))
{
We have found the good class
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks