4 ms·
The {4} is being applied to the whole group which includes a .* Isn't that correct?
by eddd-ddde 2y ago
The {4} is being applied to the whole group which includes a .*
Isn't that correct?
- Izkata 2y agoYep, and the .* means "0 or more of anything", so it's 4 or more groups that each end with a letter. They can be consecutive or not and a group can be a single letter but doesn't need to be - so whatever the failure was, it wasn't that (or the regex was typo'd here to be correct instead of what was actually on the site).
- account42 2y agoThe regexp still requires four letters before the last digit or special character which is a weird requirement.
- GrantMoyer 2y agoThe (?=…) are "lookaheads". They match the enclosed pattern without advancing the cursor.