ONIGMO regex question...

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Nov 8, 2015
How can I use backreference less than 1 followed by a numeric character?? Suppose the regex is to insert 0 between a word and a dec number, for instance I'd replace bk391 to become bk0391. So set t=bk391 and command is
echo %@rereplace[^([a-z]+)(\d+),\10\2,%t]
will give ERROR instead of giving bk0391 as engine think I refer to a non-existent group of 10th captured group instead of the1st..
Please help me...many thankfulness in advance
Jan 3, 2012
Enclose the back-reference number in curly brackets:
or quote the zero with a caret: