1*e6d6c189SCody Peter Melloinput 12345 2*e6d6c189SCody Peter Mellooutput gsub(/regex/,"x",input) 3*e6d6c189SCody Peter Mello 4*e6d6c189SCody Peter Melloregex output 5*e6d6c189SCody Peter Mello(^) x12345 6*e6d6c189SCody Peter Mello($) 12345x 7*e6d6c189SCody Peter Mello(^)|($) x12345x 8*e6d6c189SCody Peter Mello($)|(^) x12345x 9*e6d6c189SCody Peter Mello(2) 1x345 10*e6d6c189SCody Peter Mello(^)|2 x1x345 11*e6d6c189SCody Peter Mello2|(^) x1x345 12*e6d6c189SCody Peter Mello($)|2 1x345x 13*e6d6c189SCody Peter Mello2|($) 1x345x 14*e6d6c189SCody Peter Mello(2)|(^) x1x345 15*e6d6c189SCody Peter Mello(^)|(2) x1x345 16*e6d6c189SCody Peter Mello(2)|($) 1x345x 17*e6d6c189SCody Peter Mello($)|(2) 1x345x 18*e6d6c189SCody Peter Mello.((2)|(^)) x345 19*e6d6c189SCody Peter Mello.((^)|(2)) x345 20*e6d6c189SCody Peter Mello.((2)|($)) x34x 21*e6d6c189SCody Peter Mello.(($)|(2)) x34x 22*e6d6c189SCody Peter Mellox*((2)|(^)) x1x345 23*e6d6c189SCody Peter Mellox*((^)|(2)) x1x345 24*e6d6c189SCody Peter Mellox*((2)|($)) 1x345x 25*e6d6c189SCody Peter Mellox*(($)|(2)) 1x345x 26