Surprisingly relevant?
Surprisingly relevant?
Posted May 20, 2020 16:30 UTC (Wed) by scientes (guest, #83068)In reply to: Surprisingly relevant? by NYKevin
Parent article: The state of the AWK
Posted May 20, 2020 20:05 UTC (Wed)
by NYKevin (subscriber, #129325)
[Link]
(Strictly speaking, it is not correct to claim that non-greedy matching is required for parsing arbitrary regular languages. Formally, a regular language can be parsed entirely in terms of literal characters, parentheses, alternation, and the Kleene star, plus anchoring if you assume that regexes are not implicitly anchored. But this might require a very long and unwieldy regex in practice, so a lack of non-greedy matching is certainly a valid complaint.)
Alternatively, I suppose you could use ex(1) noninteractively (with -c {command} or +{command}).
Surprisingly relevant?