@RichFelker I came to the conclusion POSIX BRE without extensions is not a regular language. Need \| for it to be.
Regex exercise: Rewrite ERE (a|b)*, where a and b are individually expressible as BRE, in BRE.
-
-
-
@SortieCat Languages representable by BRE are surely regular; your claim seems to be that it's incapable of describing _all_ regular langs. -
@RichFelker Ah. (a*b*)*. -
@SortieCat Yep. Alternatively you can use \{0,1\} in place of ?. But I don't see a way to do (a|b) without the *. -
@RichFelker Ah, it slipped my mind \{0,1\} is BRE, forgot to check that when looking up if \? was. -
@RichFelker Assuming subexpression anchor extension (permitted by POSIX) (^a$)\{0,1}(^b$)\{0,1} gets close, but matches empty string too. -
@SortieCat I was assuming this could all be part of a larger expression (that's needed for generality), so anchoring is not useful. -
@RichFelker Yep, or if you want to match part of a string, not the whole string, as regexec does. Just thinking out loud.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.