hsnips
hsnips copied to clipboard
Regular Expression with underscore
I want to write b1_1 to make it look like b_{1}^{1} There seems to be an issue to locate the underscore sign ("_") with the regular expression. And underscore isn't a metacharacter.
snippet `[A-Za-z][0-9]_[0-9]` w
``rv=m[0][0] + "_{" + m[0][1] + "}^{" + m[0][3] +"}"``
endsnippet