In PL\SQL code which I am editing with Notepad++ I have following:
where REGEXP_SUBSTR (a.val, '(\d+)\', 1, 1, NULL, 1) = b.key
Because of \'
Notepad++ does not interpret '
as quote closure and rest of source do not have syntax coloring - it has grey color like quoted text.
Is there any way to tell Notepad++ to do not interpret \
as escape character, thus \'
will be interpreted as valid end of quote?
I was searching program preferences, but without any success.
EDIT
Strange. When I open new new file, type this line, choose Language > S > SQL then text is highlighted OK. But when I change tab and then return I have bad coloring again. Choosing Language > S > SQL again makes no difference.
In particular, the \n escape sequence represents the newline character. A \n in a printf format string tells awk to start printing output at the beginning of a newline.
But just use the find and replace. Look for ":\n" and replace with "\n" or something like that. You may need to mess with the find and replace options.
Character combinations consisting of a backslash (\) followed by a letter or by a combination of digits are called "escape sequences." To represent a newline character, single quotation mark, or certain other characters in a character constant, you must use escape sequences.
There is now an option in Notepad++ (since 2014-05-11) to ignore backslash as an escape character for SQL.
Uncheck the box at 'Settings' - 'Preferences' - 'MISC.' - 'Treat backslash as escape character for SQL'
(In v7.7.1, at least, you need to restart np++ for this change to take effect.)
In case of Oracle PL/SQL I've changed escape character after e.g. character E from:
LIKE 'E\_%' ESCAPE '\'
to:
LIKE 'E?_%' ESCAPE '?'
which did the trick. Not a solution, but if the escape character change is OK, it will do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With