Actions
Bug #5363
closed$bfind().regex does not populate $regml() properly
Start date:
07/24/2021
Due date:
% Done:
0%
Estimated time:
Operative System:
All
Regression:
No
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!
Updated by westor (GR) over 3 years ago
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
Updated by Per Amundsen over 3 years ago
- Subject changed from /bcopy -c bug to $bfind().regex does not populate $regml() properly
- Status changed from New to Resolved
Actions