see on GitHub

Session: Querying: How to Use Regex

To return only documents that match a given regular expression, use the 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'
const products = await session.query({ collection: "Products" })
    .whereRegex("name", "^[NA]")
    .all();
from Products 
where regex(name, '^[NA]')