regex-for-regular-folk
regex-for-regular-folk copied to clipboard
Example does not really make sense
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?