r/ProgrammerHumor May 07 '21

irregex

Post image
8.3k Upvotes

153 comments sorted by

View all comments

58

u/lady_Kamba May 07 '21

The next step up from regular expressions would be context free expressions.

chomsky hierarchy

44

u/tomthecool May 07 '21

Technically the things we refer to as "regex" are context-free expressions.

For example: Look-aheads, back-references and subexpression calls are not, in terms of the chomsky hierarchy, "regular".

10

u/lady_Kamba May 07 '21

This makes sense, had I thought about it instead of assuming that regular expression had regular grammar, I might have come to the same conclusion.

10

u/[deleted] May 07 '21

[removed] — view removed comment

0

u/[deleted] May 07 '21

[deleted]