re #8 Replacing the is_regex call because it's deprecated