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 

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 :-)



PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to