$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
And is there any place I can learn regular expressions? I know the basics.
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.
This seems to be used to match the comments
/* … */:/\*matches the leading/*[^*]*\*+matches any following characters except*followed by one or more*([^/][^*]*\*+)*matches zero or more sequences of characters beginning with any character except/(to avoid a premature end since the last character is a*), followed by any character except*, followed by one or more*/matches the ending/