Hi, please does anybody know how to write an logical & (&&) expression in mysql regexp query?
Something like this (does not work):
select * from tab where regexp(string1 && string2)
to search for a record which contains string1 and string2.
Thanks
There is no logical AND that can be used in a MySQL REGEXP, so you have to write it as 2 separate conditions -
SELECT * FROM tab WHERE col_name REGEXP 'string1' and col_name REGEXP 'string2';