original-mawk icon indicating copy to clipboard operation
original-mawk copied to clipboard

RLENGTH is wrong for regexes with two identical consecutive '?' matches

Open pstumpf opened this issue 1 year ago • 1 comments

Consider this testcase:

match($1, /foobar1?1?/) {
        print RLENGTH
}
$ echo foobar11 | mawk -f test.awk 
7

bwk's awk, gawk as well as mawk when compiled with system regex instead of the internal regex engine print the correct result 8.

pstumpf avatar Mar 22 '24 15:03 pstumpf

thanks - I can reproduce this.

ThomasDickey avatar Mar 24 '24 22:03 ThomasDickey

fixed in 20240819

ThomasDickey avatar Aug 20 '24 00:08 ThomasDickey