How would I make these two previous ereg_replace expressions work with preg_match?
http://([.]?[a-zA-Z0-9_/-])*|
and
(^| |\n)(www([.]?[a-zA-Z0-9_/-])*)
adding code from comment
preg_replace("http://([.]?[a-zA-Z0-9_/-])*", "<a href=\"\\0\" target=\"_blank\">\\0</a>"