Plan9port's awk needs the regexp delimiter / to be escaped even when between square brackets in a regexp.
AFAIU, except for the hyphen, characters between square brackets in a regexp need not to be escaped, as they are taken literally. However, in p9p awk, the regexp delimiter character, the slash /, needs to be escaped in that context.
In the image, I compare the following command in GNU awk, mawk, OpenBSD awk and Plan9port awk.
It works in all awk implementations, except in p9p's.
Plan9port's awk needs the regexp delimiter / to be escaped even when between square brackets in a regexp.
AFAIU, except for the hyphen, characters between square brackets in a regexp need not to be escaped, as they are taken literally. However, in p9p awk, the regexp delimiter character, the slash /, needs to be escaped in that context.
In the image, I compare the following command in GNU awk, mawk, OpenBSD awk and Plan9port awk.
It works in all awk implementations, except in p9p's.