Using Regex

To return only documents that match regular expression,
use the where_regex method which enables RavenDB to perform server-side pattern matching queries.

The supplied regular expression must be .NET compatible.

Example

# loads all products, which name
# starts with 'N' or 'A'
products = list(session.query(object_type=Product).where_regex("Name", "^[NA]"))
from Products 
where regex(Name, '^[NA]')