I started learning regex recently. I know that *
modifier means match 0 or more times
while +
modifier means match 1 or more times
.
However when you use these modifiers with square brackets, how will the code get parsed? It seems to me that using square brackets would equalize the +
and *
.
For example: What is the difference between [\w\s,:]+
and [\w\s,:]*
?