Matthew Smillie
7/28/2006 9:05:00 PM
On Jul 28, 2006, at 21:56, 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|]/)
| is a reserved character in regexes for disjunction, i.e. /a|b/
matches a or b, where a and b are arbitrary regexes.
This ought to work for your purposes, I think:
if arg.index(/[\s\|]/)
matthew smillie.