How would I change
$output = ereg_replace("<script.*</script>", "", $output);
to preg?
I tried $output = preg_replace("/<script.*</script>/", "", $output);
Thanks
EDIT: Sorry, messed up formatting
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use
/as the delimiter, you must escape every occurence of/within the pattern, or its recocnized as delimiter itself and everthing following will be used as modifiers (which will probably fail).or you make your life easy and just choose a different delimiter. I prefer
~, because it occurs in patterns quite infrequentUpdate: See comments for the description, what happens here