[ACCEPTED]-Regex.Replace: How to use $groups followed by numbers-regex
Accepted answer
You need to use the alternate syntax:
Regex::Replace(text, "(6)", "${1}78");
0
It seems I can use $`
Regex::Replace(text, "(6)", '$1$`78');
0
You can use backreferences to capture a 2 named group and replace that named group 1 with whatever you want. view this link
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.