ThomasDickey / original-mawk

bug-reports for mawk (originally on GoogleCode)
http://invisible-island.net/mawk/mawk.html
17 stars 2 forks source link

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

Open pstumpf opened 3 months ago

pstumpf commented 3 months ago

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.

ThomasDickey commented 3 months ago

thanks - I can reproduce this.