Skip to content

Conversation

timgraham
Copy link
Collaborator

Prepare the way for operators that generate $match sytnax.

Prepare the way for operators that generate $match sytnax.
Comment on lines +110 to +113
def _regex_expr(field, regex_vals, insensitive=False):
regex = {"$concat": regex_vals} if isinstance(regex_vals, tuple) else regex_vals
options = "i" if insensitive else ""
return {"$regexMatch": {"input": field, "regex": regex, "options": options}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this from a function to a method to match _isnull_expr() (and the added methods in #396).

@timgraham timgraham merged commit 5de095b into mongodb:main Oct 14, 2025
17 checks passed
@timgraham timgraham deleted the operator-name branch October 14, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants