added support for regexes