ziishaned / learn-regex

Learn regex the easy way
https://gum.co/learn-regex
MIT License
45.61k stars 6.24k forks source link

Add supported language feature comparison #83

Open eshleebien opened 7 years ago

eshleebien commented 7 years ago

As stated in Wikipedia,

An application using a library for regular expression support does not necessarily offer the full set of features of the library, e.g. GNU grep which uses PCRE does not offer lookahead support, though PCRE does.

Here's a the link of language feature comparison https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines#Language_features I think it would be helpful to add it

Awesome work! Thanks for this 👍 👍

jeremydouglass commented 5 years ago

This idea is also suggested in #81

I agree, and would go further -- a key idea that beginners need to understand immediately is that regex isn't a stable, specified language -- it is a family of dialects. This gets discussed in various places as "dialects" "flavors" or in terms of "engines."

This has practical consequences, because they can find a piece of tutorial code, try to use it somewhere, and it doesn't work -- and they don't know why. They may also fail when using public online tools like regex101 or regexbuddy because they don't know to configure it for their specific dialect/engine.

So a detailed breakdown of the differences between dialects would be a nice bonus advanced feature for the end--not important for beginners. However, the fact that they exist (PCRE, ECMAScript, Python, Golang etc.) with variable syntax and different features -- and that the tutorials are written in a specific one of them -- is a must-have fact to describe in the introduction.