eo icon indicating copy to clipboard operation
eo copied to clipboard

Make replace pattern in `regex.replace` aware of matching groups.

Open mximp opened this issue 3 years ago • 0 comments

Make it possible to refer to matching groups by index like in the example below:

[] > app
  stdout > @
    replace
      "a1a A2B B3B"
      "/((([A-Za-z])[0-9])\g{2})/"
      "$2"

Output:

"a1 A2B B3"

For more information see #865 description and Java Matcher

mximp avatar Jul 27 '22 07:07 mximp