What is the proper syntax for a method that checks a string for a pattern, and returns true or false if the regex matches?
Basic idea:
def has_regex?(str
For Ruby >= 2.4 or Rails, you can do:
regexp.match?(string)