regex

Thomas Castonzo tcastonzo at comcast.net
Tue Feb 28 23:50:36 GMT 2006


Hello All:

I'm trying to write a regular expression that will strip <a href> </ 
a> tags from documents
but want to leave the linked text alone so the document still makes  
sense.
Our server has no modules so I would have to do it like this:

/<a [^<]*href=["|\']?([^ "\']*)["|\']?[^>].*>([^<]*)</a>/i

Thanks,

Tom


More information about the london.pm mailing list