From: Justin Gamble Date: 2012-11-01T13:07:36+09:00 Subject: Re: need regex to check for consonants and put number after each consonant Thank you so much for your help guys! That part worked like a charm! Now how would I go about taking the 0 out of a sentence that is passed thru to_num? I have this: class Num def to_num( string ) string.gsub( /(?<=[bcdfghj-np-tvwxz])/i, '0' ) end def to_english( num_string ) num_string.gsub( /[0]/, '' ) end end num= Num.new puts num.to_num( "Wow! Look at this get converted to Num!" ) { |c| print c} num_string = "" num.to_num( "I'm in num but I want to be in english." ) { |c| num_string += c } puts num_string puts num.to_english( num_string ) { |c| print c } its the same instance of the first created class. -- Posted via http://www.ruby-forum.com/.