ereg_replace

From: Date: Sat, 31 Aug 2002 13:13:11 +0000
Subject: ereg_replace
Groups: php.db 
Request: Send a blank email to php-db+get-21492@lists.php.net to get a copy of this message
Could somebody explain to me how the ereg_replace function works? For as for as I understand it replaces strings by a different string (as explained on the php site) but what I don't understand is how the following line creates "real" links: $Content = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=\"_blank\">\\0</a>", $Content); How does this work? Where is the alpha, space, alnum and \\0 stuff come from? The main reason why I ask this is because I want to search in a string for strings like "[QUOTE]" and/or "[/QUOTE]" and replace these with html tags but for some reason it starts doing realy weird stuff :-) Cheers Prodoc

« previous php.db (#21492) next »