2 ms·
Hahaha that's wild, but... I have to feel like it's abuse to use regex here!
by roflyear 4y ago
Hahaha that's wild, but... I have to feel like it's abuse to use regex here!
- ShamelessC 4y agoShh, nobody tell them GOFAI didn’t pan out.
- LoganDark 4y agohttps://stackoverflow.com/a/1732454 https://stackoverflow.com/a/1732454
- jw1224 4y agoGiven an arbitrary LaTeX string... - which may contain 0 or more \parameter macros - of which each will either have one (\parameter{123}) or two (\parameter{123}{blue}) arguments ... besides regex, how else would you suggest replacing the entire macro with simply the value of its first argument (i.e. 123)? I can do it in one line with regex, but if there's an easier way, I'm all ears :)
- roflyear 4y agoI'd have to learn more about the problem! But at the end of the day if regex works for you it works for you :)