Re: wrapping anchor tags around a URL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/25/06, Ahmed Saad <ahmed.lists@xxxxxxxxx> wrote:> On 1/25/06, Ahmed Saad <ahmed.lists@xxxxxxxxx> wrote:> > On 1/23/06, Richard K Miller <richardkmiller@xxxxxxxxx> wrote:> >> > > function link_the_links($s) {> > >         return preg_replace('@(http://[^\s]+)@sm', '<a href="$1">$1</a>', $s);> > > }
try "looking ahead" in the first regexhttp://www.regular-expressions.info/lookaround.html

-ahmed

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux