HF RL Explorer

Task: JavaScript Regex - Lookbehind Alternative

Task: JavaScript Regex - Lookbehind Alternative: a task in Terminal-Lego-15k (Harbor dataset). JavaScript (ES5/older environments) does not support regex lookbehind assertions. Your task is to write a JavaScript solution that mimics the behavior of the following regex pattern:

The task

JavaScript (ES5/older environments) does not support regex lookbehind assertions. Your task is to write a JavaScript solution that mimics the behavior of the following regex pattern:

Part of PrimeIntellect/Terminal-Lego-15k.