D
Dan Kelly
Im just after a bit of clarification with quantifiers in regular
expressions.
I just want to be sure of the differences between the quantifiers. so
for these various regular expressions,
[a-z]* - this will match any amount lower case letters
[a-z]+ - this will match any amount lower case letters
(whats difference between + and * in this case?)
[a-z]+? -
or
\d* - This will match any amount of digits
\d*? - This will only match none or one number
Please can someone offer some clarification Im still unsure of myself
with these expresions as I'm new to ruby,
Thanks,
Dan
expressions.
I just want to be sure of the differences between the quantifiers. so
for these various regular expressions,
[a-z]* - this will match any amount lower case letters
[a-z]+ - this will match any amount lower case letters
(whats difference between + and * in this case?)
[a-z]+? -
or
\d* - This will match any amount of digits
\d*? - This will only match none or one number
Please can someone offer some clarification Im still unsure of myself
with these expresions as I'm new to ruby,
Thanks,
Dan