By the looks of it {he thinks} he knows what he’s doing.

RegEx Like No Other

After having wrestled with a regular expression for almost 2 weeks I was able to complete the code needed to search and replace HREFs in <a> tags with some javascript. The code is as follows:

s/<a (.*?)HREF\s*=\s*"(?!(javascript|mailto|[#]))(.*?((FL(?{$w=250})|OV(?{$w=800})|TK(?{$w=350}))(\w|_)*?\.htm).*?)"(.*?)>
/<a href="http://www.orwd.com/blog/wp-admin/post.php#" mce_href="http://www.orwd.com/blog/wp-admin/post.php#" onClick="
w=window\.screen\.width-$w-12;
window\.open('$3','helpWin$i','top=0,left='+w+',width=$w,
height=650,top=no,status=no,toolbar=no,menubar=no,
location=no,scrollbars=yes,resizable=yes');">/gis;

I can happily blame Lynn Killam and my partner Fred Kush for this undertaking. I am very happy to tell you that it works beautifully.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a comment for: "RegEx Like No Other"

You must be logged in to post a comment.