Hi -- On Sat, 29 Jul 2006, Robert La ferla wrote: > I am trying to quote arguments that have whitespace or a pipe (vertical > bar character = | ) in them. Why doesn't this work? What does work? > > > > if arg.index(/[\s|]/) > ... > > end It seems to work OK: irb(main):008:0> "abc|".index(/[\s|]/) => 3 irb(main):009:0> " abc".index(/[\s|]/) => 0 What results are you getting? David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy ----> SEE SPECIAL DEAL FOR RUBY/RAILS USERS GROUPS! <----- http://dablog.rubypal.com => D[avid ]A[. ]B[lack's][ Web]log http://www.manning.com/black => book, Ruby for Rails http://www.rubycentral.org => Ruby Central, Inc.