[thelist] regexp question

Brian Cummiskey Brian at hondaswap.com
Tue Jul 13 17:32:45 CDT 2004


Alex Beston wrote:

> hiya
>
> function findLinks($theHtml){
>    preg_match_all("%<A[^>](.*?)>(.*?)<\/A>%", $theHtml, $matches);
>
>    return $matches ;
>    }
>
> in my php code the above works ok but it adds a couple of "\" to the 
> source eg
>
> <A href=\"blah.html\">
>
> how do i get the "\"'s out so that i have just
>
> <A href="blah.html">
>
> thanks
> Alex
>
>
>
without touching the code at all, how about a simple:
return  stripslashes($matches);




More information about the thelist mailing list