Regular expression does not match multi-line string
ko1nksm opened this issue · comments
Koichi Nakashima commented
Regular expression does not match multi-line string.
$ goawk 'BEGIN{VAR="a\nb"; print match(VAR, /^a.*b$/)}'
0
$ goawk 'BEGIN{VAR="a\nb"; print match(VAR, /(?s)^a.*b$/)}'
1
$ gawk 'BEGIN{VAR="a\nb"; print match(VAR, /^a.*b$/)}'
1
$ mawk 'BEGIN{VAR="a\nb"; print match(VAR, /^a.*b$/)}'
1