=~
in Object
returns nil
.
*
+ * Note: str =~ regexp
is not the same as
+ * regexp =~ str
. Strings captured from named capture groups
+ * are assigned to local variables only in the second case.
+ *
* "cat o' 9 tails" =~ /\d/ #=> 7
* "cat o' 9 tails" =~ 9 #=> nil
*/