How to check whether a string contains special character in ruby. If I get regular expression also it is fine.
Please let me know
"Hel@lo".index( /[^[:alnum:]]/ )
This will return nil in case you do not have any special character and hence eaiest way I think.
nil