3 ms·
sometimes I wonder if "native" support for regexes would help this, or if it would just be another instance of https://xkcd.com/1171 https://xkcd.com/1171 rege
by Groxx 8y ago
sometimes I wonder if "native" support for regexes would help this, or if it would just be another instance of https://xkcd.com/1171 https://xkcd.com/1171
regexes describe this sort of thing quite concisely and IMO a fair bit more readably than e.g. bash's string replacement syntax, which looks like
"${var#"${var%%[![:space:]]*}"}"
when you want to do the equivalent of
s/^\s*(.*?)\s*$/\1/
- naniwaduni 8y agoIt wouldn't even be another standard; it'd just be another incompatible implementation with its own quirks to be worked around.
- Groxx 8y agoyeah, the wide variance in regex engines would definitely not be a positive quality :|