add support for custom regex