diff options
author | Kim Kibum <kb0929.kim@samsung.com> | 2012-05-21 17:42:43 +0900 |
---|---|---|
committer | Kim Kibum <kb0929.kim@samsung.com> | 2012-05-21 17:42:43 +0900 |
commit | 4a2c24a45b7af1aa715eae442c7ef3d91e7dde6d (patch) | |
tree | 5431ff1d419d4ee35f8bd3cb3ebd5e334c2a737e /test/match1.awk | |
parent | c22a3ed09b982b93feb23655eba7b55fa27885cb (diff) | |
download | gawk-4a2c24a45b7af1aa715eae442c7ef3d91e7dde6d.tar.gz gawk-4a2c24a45b7af1aa715eae442c7ef3d91e7dde6d.tar.bz2 gawk-4a2c24a45b7af1aa715eae442c7ef3d91e7dde6d.zip |
Upload Tizen:Base source
Diffstat (limited to 'test/match1.awk')
-rw-r--r-- | test/match1.awk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/match1.awk b/test/match1.awk new file mode 100644 index 0000000..6d4791b --- /dev/null +++ b/test/match1.awk @@ -0,0 +1,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"]) + } +} |