From: Paul Battley Date: 2006-06-30T00:19:43+09:00 Subject: Re: command line with regexp same as script but didn't work On 29/06/06, agouti agouti wrote: > it ok , but when i try try with command line : >
cat  file.html | ruby -pe 'gsub(/()/, '')'
> i got a error : Perhaps it's because you tried to nest single quotes within single quotes. You need to use something else instead, like double quotes or %q (equivalent to '): cat file.html | ruby -pe 'gsub(/()/, %q())' Paul.