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))