In Sublime Text 3, a default syntax highlighting rule paints a SQL
SELECT just fine if it's in the same line, but not if it's in the next line:
After reading this question I opened the PHP package (this is a php project) and looked at the syntax rules (PHP.tmLanguage):
<dict> <key>begin</key> <string>"\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)</string> <key>beginCaptures</key> <dict> <key>0</key> <dict> <key>name</key> <string>punctuation.definition.string.begin.php</string> </dict> </dict>
As far as I could tell that regex is correct, but I still tested it in regex101. It does capture the
SELECT just fine there, so I don't think there is any problem with the actual regex.
Any idea how to make the syntax highlighted on multiple line SQL strings?