Add regular expression support to rules