On Wed, Aug 09, 2017 at 01:34:13PM +0530, Logeshwaran G wrote:
I have given the below query,
INSERT INTO dialplan(id, dpid, pr, match_op, match_exp, match_len,
subst_exp, repl_exp, attrs) VALUES (1, "1", "1", 1, "^000[0-9]+$
", 0,
"^000([0-9]+)$", "\1", " ");
But the Rule is tking as "1"
See
https://dev.mysql.com/doc/refman/5.7/en/string-literals.html
"Within a string, certain sequences have special meaning unless the
NO_BACKSLASH_ESCAPES SQL mode is enabled. Each of these sequences begins
with a backslash (\), known as the escape character. MySQL recognizes
the escape sequences shown in Table 9.1, “Special Character Escape
Sequences”. For all other escape sequences, backslash is ignored. That
is, the escaped character is interpreted as if it was not escaped. For
example, \x is just x. These sequences are case sensitive. For example,
\b is interpreted as a backspace, but \B is interpreted as B. "