June 25, 2025 • Chroma Cloud
Launching regex search support
You can now search in Chroma using regular expressions.
Regex search enables you to:
Use case | Example regex |
---|---|
Identify function calls in code | \b\w+\( |
Find email addresses inside any document | [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,} |
Extract TODO comments in code | TODO[: ] |
Locate US phone numbers | \(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4} |
Check for URLs | https?://[^\s]+ |
API#
To run a regex search, apply the $regex
or $not_regex
operator on the where_document
field in a .query
or .get
.
Example#
Here is an example in Python:
Regex support is also now directly supported in the Chroma Cloud UI.
(This example searches for numbers with significant digits)