It is not documented on this page, but it is documented in Kernel.=~/2 , which, when RHS is a string, =~ checks if LHS contains RHS:
iex(1)> "foo" =~ "f" true iex(2)> "foo" =~ "o" true
It does not imply converting RHS to regex:
iex(3)> "foo" =~ "." false
Dogbert
source share