regex-for-regular-folk icon indicating copy to clipboard operation
regex-for-regular-folk copied to clipboard

Example does not really make sense

Open renaud opened this issue 1 year ago • 0 comments

Thanks for this great tutorial!!

https://github.com/shreyasminocha/regex-for-regular-folk/blob/974120e99e36a7bae14be913941e45b90bedc309/chapters/en/repetition.mdx#L146

A student of mine remarked that this example does not really make sense:

{2,4}? will always fall back to only matching 2 characters, so it would make more sense to write {2}?

but then again, {2}? does not make sense either, because it will always be {2}

What do you think?

renaud avatar Feb 19 '24 08:02 renaud