xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/gsubtest.awk (revision 533affcbc7fc4d0c8132976ea454aaa715fe2307)
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