gsub numbers and +

Viewed 1449

I'm saving a number with params[:number].gsub(/\D/,''), but I don't want to strip the plus symbol: +

For example if a user saves number +1 (516) 949-9508 it saves as 15169499508 but how can we preserve the + as +15169499508?

3 Answers
Related