On 17 Nov., 12:22, Alex Young <a... / blackkettle.org> wrote:
> Backslashes are confusing.   Try this:
>
> puts "this is a test".gsub( "a", "\\\\'" )
>
> --
> Alex

Thank you, you saved my day!

This really is confusing, because "\\'" gives me the correct result if
I don't use it with gsub:

puts "\\'" -> \'

Am I missing something here?

Andreas