my_string = 'Here the
i.e. I can delete or ("|").
That's how I got here, can I get shorter?
src = "Here the #: 49848! - but will dashes, commas & stars (*) show?" puts "A) - " + src puts "B) - " + src.gsub(/\d\s?/, "") puts "C) - " + src.gsub(/\W\s?/, "") puts "D) - " + src.gsub(/\d|\W\s?/, "") puts "E) - " + src.gsub(/\d|\W/, "") puts "F) - " + src A) - Here the
nd D) and E) is what I want for output. Just characters.
source share