I’d like to use the regex
%[ _]play[ ,_]%
where % is denotes allows some arbitrary string to appear. For example, I’d want to check that this regex appears in some where in some string. Is this valid?
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.
No, it is not valid. The easiest way would be to simply remove the percentage signs, because a string doesn’t need to match the specified regex exclusively.
This regex:
will match this string: