Reimplement =~ to use Regex.match? or String.contains?

I'm not sure this is how it should be done. Besides, the compiler is being too smart here and spams warnings.