summaryrefslogtreecommitdiff
path: root/test/regexprange.awk
blob: 861e5ee573f354dda5afa773c07206ec1b6da74f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BEGIN {
	range = "[a-dx-z]"

	split("ABCDEFGHIJKLMNOPQRSTUVWXYZ", upper, "")
	split("abcdefghijklmnopqrstuvwxyz", lower, "")

	for (i = 1; i in upper; i++)
		printf("%s ~ %s ---> %s\n",
			upper[i], range, (upper[i] ~ range) ? "true" : "false")

	for (i = 1; i in lower; i++)
		printf("%s ~ %s ---> %s\n",
			lower[i], range, (lower[i] ~ range) ? "true" : "false")
}