Bug #5363
closed
$bfind().regex does not populate $regml() properly
Added by westor (GR) over 3 years ago.
Updated over 3 years ago.
Description
Hello,
It seems /bcopy doesn't work in the following case.
//bset -t &a 1 one two three | if ($bfind(&a,1,/((?:^| )two)(?= |$)/).regex) { bcopy -c &a $regml(1).pos &a $calc($regml(1).pos + $len($regml(1))) -1 } | echo -a $bvar(&a,1-).text
- Thanks!
My bad, it's not related on /bcopy
command, it seems the bug related on $regml().pos
identifier.
Example:
//bset -t &a 1 one two three | if ($bfind(&a,1,/((?:^| )two)(?= |$)/).regex) { echo -a bcopy -c &a $regml(1).pos &a $calc($regml(1).pos + $len($regml(1))) -1 }
returns: bcopy -c &a &a 0 -1
should return: bcopy -c &a 4 &a 8 -1
- Subject changed from /bcopy -c bug to $bfind().regex does not populate $regml() properly
- Status changed from New to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF