added support for "$regex"