ubuntu-buildroot/output/build/host-gawk-5.2.0/test/ignrcas3.awk

21 lines
441 B
Awk
Raw Normal View History

2024-04-01 15:19:46 +00:00
BEGIN {
dfapat[1] = data[1] = "b\323"
dfapat[2] = data[2] = "b\362"
dfapat[3] = data[3] = "b\363"
regexpat[1] = "[a-c]\323"
regexpat[2] = "[a-c]\362"
regexpat[3] = "[a-c]\363"
IGNORECASE = 1
for (i = 1; i <= 3; i++) {
for (j = 1; j <= 3; j++) {
printf("data[%d] ~ dfa[%d] = %s\n", i, j,
data[i] ~ dfapat[j] ? "ok" : "bad")
printf("data[%d] ~ regex[%d] = %s\n", i, j,
data[i] ~ regexpat[j] ? "ok" : "bad")
}
}
}