Hacker News new | ask | show | jobs
by reuser 5210 days ago
I applaud your effort. Regex is a valuable skill (really, language) which you will use across languages and programs as it gives you access to an efficient and pretty general method for scanning and extracting things from text. And if you study fundamentals of computer science (like the Chomsky hierarchy) you will also find that regular expressions are important there too.
1 comments

But, to make life more exciting, the regular expressions you'll see in actual CS/math are strictly less powerful than the Perl-style regexes you see in Python. E.g. the language accepted by /(a+b+)\1/ is clearly not regular.