I have pre-build application and in this application, there are some MySQL queries which are executing Regex queries. And I'm trying to use those queries other place. When I'm using same Regex query other place then those are not working.
Here is my query
SELECT * FROM `table_name`
WHERE field_name REGEXP '^[[:<:]]e[^[:space:]]* k.*'
When I'm executing this query in MySQL then getting this message:-
#3685 - Illegal argument to a regular expression.
I'm stuck here. Please help me to resolve issue.
Edited:-
Wiktor Stribiżew as you told to use \\b
if I'm using [[:<:]]
or [[:>:]]
. But query is not providing any result. Below is the query which I'm executing:-
SELECT * FROM `table_name` WHERE field_name REGEXP "\\b'what that'\\b"