Regex: Matched and replaced Regex doesn't work with $1 JS

Viewed 21

I'm trying to replace all the numbers after pull/ with previously captured and modified regex but it seems not work with my code

Text I'm working with:

* test/pull/763
* test/pull/760

What I want to get

* test/pull/((763))
* test/pull/((760))

My code, that doesn't work:

 const replacePulls = fileData.replace(/(?<=pull\/\s?)\w+/g, '(($1))');
0 Answers
Related