Sublime Forum

Regex support -- doesn't ST2 use the Boost library?

#1

As documented here, seems like this should work:

\b([a-zA-Z\-:]+)\s*=\s*(("|')?.*?(?3\s:\3))) ^^ errors out

But I’m getting an “invalid group option” error. Trying to extend the HTML syntax with attribute-value in addition to attribute-name:

Edit: More evidence that this should work. Is there a different regex parser in use between .sublime-snippet and .tmLanguage ?

Edit 2: Revised my regex a bit, seems to do the trick. Still curious about this error though.

\b([a-zA-Z\-:]+)\s*=\s*(("']?).*?(\3))
0 Likes

tmLanguage preceded by
Oniguruma syntax definition help
#2

.tmLanguage files use the Oniguruma regex library, while the Find panel and snippets use boost regex.

0 Likes

#3

Thanks for the reply Jon. I’ll dig into that API to see what the differences are.

0 Likes