Possible Duplicates:
How can I convert ereg expressions to preg in PHP?
What is the equivalent using preg_replace to the following expression?
ereg_replace('^' . $g_lang_prefix, '', $t_var );
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 need
$g_lang_prefixworking as a common regex then omitpreg_quote(quite obvious)
Also if you need this second solution, but your
$g_langcan contain even this char/then you need to escape at least it: