xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/gsubtest.awk (revision b69c34dad3717624ff6b4f32b71014ee05b6a678)
1BEGIN {
2	str = "abc"; print gsub("b+", "FOO", str), str
3	str = "abc"; print gsub("x*", "X", str), str
4	str = "abc"; print gsub("b*", "X", str), str
5	str = "abc"; print gsub("c", "X", str), str
6	str = "abc"; print gsub("c+", "X", str), str
7	str = "abc"; print gsub("x*$", "X", str), str
8	str = "abc"; print gsub("b|$", "X", str), str
9}
10