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