regex - Regular expression for LaTeX with escaped } (curly brace) needed -
regex - Regular expression for LaTeX with escaped } (curly brace) needed -
i started write c programme converting latex html code. best way in sentiment utilize regular expressions, yet cannot create simple thought work pcre: replace \term{abc}
[pre]abc[/pre]
(\term
latex command of own). right here's catch:
\}
) in \term
? how handle pairs {}
? how create regular look greedy consumes first of many \term
commands, not of them? well, many questions figure out. hope can help?
ps: i'm sorry if, in case, have overlooked reply similar question...
see perlfaq6(1) "can utilize perl regular expressions match balanced text?". said, since latex's complexity seems similar (if not worse) (x)html, might want heed words of regex match open tags except xhtml self-contained tags .
regex latex pcre
Comments
Post a Comment