DEV Community

Discussion on: Basic RegEx in Javascript for beginners 🔥

Collapse
 
uwteam profile image
Jakub Mrugalski 🔥 • Edited

As You wrote in above comment:
"That means the (..) can appear 0 or 1"

So this is 0 or 1 (NONE or ONE) not "zero or MORE" (as in article).
In article, there is info, that "?" could be zero or more. For me, ie "5" is one of "more" ;)

So I think, in article it should be:
* : 0 or more
+ : 1 or more
? : 0 or 1

Because in current version, there is no difference between "*" and "?"

Thread Thread
 
tracycss profile image
Jane Tracy 👩🏽‍💻

Yes, Jakub. I update the article a few days ago.
Thank you for pointing out the error.