On 3/12/07, Brad Fuller <bfuller@xxxxxxxxxxxxxxxx> wrote: > I tried this: > > preg_match("/http(s)?:\/\/(*.?)\s/", $stringUrl, $matches) > > But my pattern syntax is messed up cuz I get this error: > > Warning: preg_match() [function.preg-match]: Compilation failed: > nothing to repeat at offset 15 in /path/to/myfile.php on line 5 > OK - I must not have had enough caffeine today. It's (.*?) not (*.?) I figured it out. echo preg_replace("/http(s)?:\/\/(.*?)\s/i", "<a href=\"$0\">$0</a>", $stringUrl); Thx, -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php