summaryrefslogtreecommitdiffstats
path: root/contrib/awk/test/gsubtest.awk
blob: 3137479577de950ecb9637d72e7f05ab847cda75 (plain)
1
2
3
4
5
6
7
8
BEGIN {
	str = "abc"; gsub("b+", "FOO", str); print str
	str = "abc"; gsub("x*", "X", str); print str
	str = "abc"; gsub("b*", "X", str); print str
	str = "abc"; gsub("c", "X", str); print str
	str = "abc"; gsub("c+", "X", str); print str
	str = "abc"; gsub("x*$", "X", str); print str
}
OpenPOWER on IntegriCloud