preg_match('/te**ed/i', 'tested', $matches);
gives me the following error:
ERROR: nothing to repeat at offset 3
What do I do to allow the pattern to actually contain *?
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.
To use literal asterisks you have to escape them with backslashes. To match the literal
te**edyou would use an expression like this:But I doubt this is what you wanted. If you mean, match any character, you need to use
.:If you really want any two lower case letter, then this expression: