From: pere.noel@... (=?ISO-8859-1?Q?Une_b=E9vue?=) Date: 2006-10-03T16:05:11+09:00 Subject: Re: shell, ruby and regexp Paul Lutus wrote: > > What's wrong with the original string enclosed in quotes? > > Instead of: > > ruby test_args.rb /to.*/ > > Type this instead: > > ruby test_args.rb "/to.*/" ok i've done THE MISTAKE to rememeber zsh as a priority over ruby ))) my answer to "What's wrong with the original string enclosed in quotes?" that didn't work, my script sees it as a string and even if (for this arg and if enclosed with //) : this_arg=Regexp.new(this_arg) then if this arg = "/to.*/" i get : puts this_arg.source # (after Regexp.new) # => /to.*/ INSTEAD OF to.* the reason why i make no use of // for a regexp arg then i'm obliged to have another arg yelling if this arg is or not a regexp. may be here i've missed something too... -- une b�vue