Hacker News new | past | comments | ask | show | jobs | submit login

What makes regular expressions in most languages not "regular"? Is there a standard from which they deviate?



Yes, there is a very specific definition:

https://en.wikipedia.org/wiki/Regular_language


"regular" here is a mathematical property related to what patterns should be able to be expressed.


Yes, there's a mathematical notion of regular expression that predates their use in computers. This article explains the difference well:

https://swtch.com/~rsc/regexp/regexp1.html




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: