1*3ee4fc2aSCody Peter MelloBEGIN { 2*3ee4fc2aSCody Peter Mello text = "here is some text" 3*3ee4fc2aSCody Peter Mello repl = "<FOO&BAR \\q \\ \\\\ \\& \\\\& \\\\\\&>" 4*3ee4fc2aSCody Peter Mello printf "orig = \"%s\", repl = \"%s\"\n", text, repl 5*3ee4fc2aSCody Peter Mello sub(/some/, repl, text) 6*3ee4fc2aSCody Peter Mello printf "result is \"%s\"\n", text 7*3ee4fc2aSCody Peter Mello} 8