Re:Regular Expression That Checks If A Number Is Prime
by JoshTriplett on Thursday September 08, 2016 @09:46PM
(#12459126)
I think the intent of the parent comments was to say that it's fine to consider a regex a standard "regular expression" in the mathematical sense if it still translates to a DFA and matches a regular language. For instance, mathematical regular expressions typically only include '*' (0 or more), not '+' (1 or more). However, you can still translate a regex including '+' to a DFA. Likewise arbitrary repetition mechanisms like {m,n}, case-insensitivity, and other features that add convenience without actually matching non-regular languages.
On the other hand, backreferences can allow matching non-regular languages.
Re:Regular Expression That Checks If A Number Is Prime
by Chinjut on Thursday September 08, 2016 @09:55PM
(#12459159)
Ah, yeah, I see now that that is indeed probably what they meant; thanks! In that case, yes, I'm sympathetic to that, using regex to just mean "Anything that ultimately describes a regular language".
I'm not actually a fan of using "regular expressions" in a sense broader than that of Kleene's regular, DFA-accepted languages, to be clear. That is exactly what I've been questioning.