CS Fundamentals Trainer · JavaScript · Security
Which regex shows catastrophic backtracking in V8 (time roughly doubling with each extra character) on input like 'a'.repeat(28) + '!'?
Which regex shows catastrophic backtracking in V8 (time roughly doubling with each extra character) on input like `'a'.repeat(28) + '!'`?
- `/^a+$/`
- `/^(a|b)+$/`
- `/^[a-z]+\d*$/`
- `/^(a+)+$/`
Difficulty: medium