+ 1
Ruby strings method đ» (an emoji to catch your attention)
I am new to ruby. If there a method to reveal if a string contains one or more numbers? For example if I want to make a password validator and make sure there are some numbers in input.
2 Answers
+ 3
I think you should use regex for this purpose. You can find more info here:https://www.rubyguides.com/2015/06/ruby-regex/
0
If there is no such method and I should define it in order to solve the task, please do not tell me, I want to try it myself at first. And if you already know such method please feel free to explain. I would be very thankful!~