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