/ Published in: Regular Expression
Sometimes HTML provided by clients or generated by WYSIWYGs contains links as plaintext with underlines in many instances and stripping this out by hand is time consuming. This search and replace (tested in PSPad, but may work in other code editors) will do the job for you.
Expand |
Embed | Plain Text
Search: <u>((http|http(s))://)?(www[^<]*)</u> Replace: <a href="http$3://$4" target="_blank">$1$4</a>
You need to login to post a comment.
