Unfortunately, as stated at https://manual.macromates.com/en/language_grammars, it is not possible to make matches over more than one line.
But, using the pattern attribute, you can make matches inside the match. For example, in Python :



Le 1 nov. 2015 à 20:37, Jacob Carlborg <doob@me.com> a écrit :

To create a pattern in a TextMate grammar that matches across multiple lines the "begin" and "end" keys are necessary. But is it possible to somehow restrict what is matched between the begin and the end?