Replace double backslashes // with one / in a string

Oh, OK, I didn't get that. You could change double backslash to single using a similar regexp that matches two backslashes with a capture group to keep the second one...

gsub => [ "message", "[\\]([\\])", "\1" ]
1 Like