Tuesday, 13 August 2013

Ruby regex remove ^C character from string

Ruby regex remove ^C character from string

There is a file that has control B and control C commands separating
fields of text. It looks like:
"TEST\003KEY\002TEST\003KEY"
I tried to create a regex that will match this and remove it. I am not
sure why this regex is not working:
"TEST\003KEY\002TEST\003KEY".gsub(/\00[23]/, ',')

No comments:

Post a Comment