ts>  well, the problem is with \\ it must be escaped twice this mean
that you
ts> must write 
ts> 
ts>   s.gsub(%r{([^A-Za-z])}, '\\\\\1')
ts> 
ts>  See the explanation in the FAQ
ts> 
ts>    9.18 How can I escape a backslash in a regexp? 
ts> 
ts>   http://www.rubycentral.com/faq/rubyfaq-9.html#ss9.18


i understand the faq, but *why* would a string be *completely*
reinterpolated?  it seems that only things like #{}, \1, \2, etc would
need be interpolated once a match operation was complete a part of the
substitution phase.  constructs like \n, \\, \e, and the like have
meanings that do not change between sytactic interpolation and the
variable interpolation (after the match); '\n' in a string should mean
*newline* whether or not that string is bound for stdout or being
passed to a routine.  i suppose it's done that way for simplicity, but
this does not seem to follow pols to me, then again i'm no language
designer ...

-a

ps.  you are all over this group, don't you work!? :-)