Disable language injection for a method/class

I have code that handles regular expression, for which IntelliJ decided to flag an error despite it being actually correct. It appears to be getting confused by a programmatic string concatanation.

While that's a bug of its own, I'd like to just disable the language injection for this particular block of code, just like how I can disable inspections for a block of code (like method or class.)

Does anyone know how to do it?

Please sign in to leave a comment.