I\'m practicing with Ruby and regex to delete certain unwanted characters. For example:
input = input.gsub(/<\\/?[^>]*>/, \'\')
and fo
An easier way to do this inspirated by Can Berk Güder answer is:
In order to delete special characters:
input = input.gsub(/\W/, '')
In order to keep word characters:
input = input.scan(/\w/)
At the end input is the same! Try it on : http://rubular.com/