Working my way through the Launch School curriculum and I had nearly forgotten how much I love regular expressions! Look at how beautiful this is:
def valid_number?(num) num =~ /\-?\d+\.?\d*f?/ end
It’s just lovely. The most wonderful site, Rubular was a huge help in working out the details. It’s a terrific little sandbox that allows you to test out our regular expressions in Ruby. You can see exactly what you’re picking up and exactly what you’re leaving behind and it’s wonderful. I could easily spend all day there.
Ok, back to work now.