summaryrefslogtreecommitdiff
path: root/test/match1.awk
blob: 6d4791be2b65f12558b1c9fd80ee81be3d71ea61 (plain)
1
2
3
4
5
6
7
8
9
BEGIN {
	data = "foooobazbarrrrr"
	match(data, /(fo+).+(bar*)/, arr)
	for (i = 0; i in arr; i++) {
		printf("arr[%d] = \"%s\"\n", i, arr[i])
		printf("arr[%d, \"start\"] = %s, arr[%d, \"length\"] = %s\n",
			i, arr[i, "start"], i, arr[i, "length"])
	}
}