Support for custom regex matching background