Filter links from HTML with these regular expressions
A quick & dirty way to filter all links from a given piece of HTML code. Does not filter attributes.
<\/*?(?![^>]*?\b(?:a)\b)[^>]*?>This one is a bit greedier #
And also filters anchor texts and is a replace:
(?i)<a\shref=\"([^>]+)\">(.+?)</a>Since it's a replace, replace the found matches with:
$1 $2
Menu
Published: June 7, 2018
~
1 min.
Ramon Eijkemans
Eikhart - Mad Scientist