source: trunk/essentials/sys-apps/gawk/test/gensub.awk

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 265 bytes
Line 
1BEGIN { a = "this is a test of gawk"
2 b = gensub(/(this).*(test).*(gawk)/, "3 = <\\3>, 2 = <\\2>, 1 = <\\1>", 1, a)
3 print b
4}
5NR == 1 { print gensub(/b/, "BB", 2) }
6NR == 2 { print gensub(/c/, "CC", "global") }
7END { print gensub(/foo/, "bar", 1, "DON'T PANIC") }
Note: See TracBrowser for help on using the repository browser.