gsub to remove spaces parenthesis and dashes out of a phone number input field
Tagged with
Ruby
Language: Ruby
View as text
@phone_number.gsub(/([-() ])/, '')
Language: Ruby
@phone_number.gsub(/([-() ])/, '')
SnippetStash costs money to host and develop. The service is free for everyone to use
but if you found it useful please consider making a small donation.