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