From: Jamis Buck Date: 2004-11-22T08:46:24+09:00 Subject: Re: Newbie Question: Escaping special characters in array of strings Gene Kahn wrote: > Hello, > > Because of the embedded single quote, this statement does not work. > > %w[it's you're they're] > > Escaping it with the backslash does not work either: > > %w[it\'s you\'re they\'re] > > How do I escape the single quote and other special characters in this instance? > > Thanks! > gk > > . > Maybe I don't understand what you mean by "does not work": irb(main):002:0> %w[it's you they're] => ["it's", "you", "they're"] It seems to work for me... - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis