HF RL Explorer

Task: Understanding JavaScript RegExp.exec() Stateful Behavior

Task: Understanding JavaScript RegExp.exec() Stateful Behavior: a task in Terminal-Lego-15k (Harbor dataset). In JavaScript, the RegExp.prototype.exec() method can exhibit seemingly inconsistent behavior when used with the global ( /g ) flag. When the same regex pattern is used repeatedly on the…

The task

In JavaScript, the `RegExp.prototype.exec()` method can exhibit seemingly inconsistent behavior when used with the global (`/g`) flag. When the same regex pattern is used repeatedly on the same string, it may return a match on one call and `null` on the next.

Part of PrimeIntellect/Terminal-Lego-15k.