added support for regular expressions