From: Jason Sweat Date: 2006-07-29T06:06:17+09:00 Subject: Re: Regex for whitespace plus vertical bar On 7/28/06, 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 Seems to work for me: $ irb >> re=/[\s|]/ => /[\s|]/ >> re.match('kldfslkd') => nil >> re.match('df |sdf') => # Regards, Jason http://blog.casey-sweat.us/