I would like to match a pattern in which two words must be present, but I cannot make my regex work.
The result is null. Why?
select 'only test bla dido simple' REGEXP '^(\\?=.*\\?(simple))(\\?=.*\\?(only))*$';
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.
For words simple and only the regular regex would be
^(?=.*\bsimple\b)(?=.*\bonly\b).*$.To accept this regex by mysql you have to add escape
\characters as needed – that is now task for you.