When using regex in Groovy (Pattern), the syntax coloring breaks and displays the following code as string, not the actual code:

Then, in a random moment, it goes back to normal:

Script works without any issue, no errors are raised from the editor itself - that's only a visual issue.