Unless you need something really simple then I would advise against using this regex and instead using a proper LaTeX parser. It requires some advanced features of regex engines, like negative lookbehind, conditional expressions and recursion which are not present in all regex engines. This works only on PCRE compatible regex engines. Since this regex uses recursion it will handle nested mathematical expressions correctly. We are a city of water surrounded by lakes and the sea and the coast. tex file, must be compiled in order to turn it into a readable document. you have to know the basic programme language that we used in MiKTeX TexWorks. # else group 4 was start, match end equation how to make a tutorial with MiKTex TexWorks how to use the Programming. # if group 3 was start, escaped bracket is end # if group 2 was start, escaped parenthesis is end # greedily and recursively match everything in between # match ending double or single dollar signs # group 1 matches do not support recursion ![]() # single or double dollar sign enforced by look-arounds (?: # start non-capture group for all possible match starts (Note that this particular example can be expressed in more elegant code by the cases construct provided by the amsmath package described in Advanced Mathematics chapter. ![]()
0 Comments
Leave a Reply. |