In search of a Regexp character class for "weird command characters"

Dear David,

Not a predefined one, but you can do:

  b.gsub!(/[006-010]/,"")

which leaves you with:

  " 1 (Fox 00 , 1 1970). 00 "

if you're sure that's what you want.

well, not really - maybe I should have added that I work under Cygwin and
Ruby1.8.2.
There,

b.gsub!(/[006-010]/,"")

returns an error ( not a valid regular expression) (because of the 006-010
bit), and
"\006" is just one character, not the same as a four-letter string.
But I have now found that I can do

b.gsub!(/\006[0-9]*/,"").gsub(/\010[0-9]*/,'')

to solve my problem.

Thanks for responding

Axel

Hi --

···

On Thu, 29 Sep 2005 Nuralanur@aol.com wrote:

Dear David,

Not a predefined one, but you can do:

  b.gsub!(/[006-010]/,"")

which leaves you with:

  " 1 (Fox 00 , 1 1970). 00 "

if you're sure that's what you want.

well, not really - maybe I should have added that I work under Cygwin and
Ruby1.8.2.
There,

b.gsub!(/[006-010]/,"")

Sorry -- I meant:

   b.gsub!(/[\006-\010]/, "")

David

--
David A. Black
dblack@wobblini.net