Alex Rivera | Logout

How to check string contains special character in ruby

Asked 2011-06-14T12:10:51.517
19

How to check whether a string contains special character in ruby. If I get regular expression also it is fine.

Please let me know

Edit
Report

1 Answer

6
"foobar".include?('a')
# => true
answered 2011-06-14T12:15:38.840

Your Answer