Ruby - Regular Expressions
What does the Ruby operator
=~ do when used like string =~ /pattern/?=~ do when used like string =~ /pattern/?=~ operator checks if a regex pattern matches anywhere in the string.nil if no match is found.=~ returns index or nil [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions