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