I'm currently working on a language plugin for the Forth programming language. I kind of mostly have the syntax highlighting for this completed, just a few tidy ups to do. I hope to eventually be able to add what codewright called code sense (how the editor recognized functions/variables) so that goto anything will work for Forth too.
However, hers my "issue"?
My syntax file has a lot of repeated regular expressions. For example, almost every single match entry is preceded by (?<=\s) and ends with (?=\s). I.E. a Forth function (called a word) can start at the beginning of a line or after a space and the end of the definitions name can be coincident with an end of line or a space.
Would it somehow be possible to plug those two regular expressions (and others) into a snippet and refer to them by name within my Forth.tmLanguage file?