/**
 * Escape all regex metacharacters in a string so it can be safely used
 * as a literal fragment inside a `new RegExp(...)` pattern.
 *
 * `escapeRegex("foo.bar")` returns `"foo\\.bar"`.
 */
export declare function escapeRegex(str: string): string;
/**
 * Build a word-boundary-aware regex that matches `keyword` surrounded by
 * non-word characters (or string edges). Returns `null` when the keyword
 * is empty or contains no regex content — callers should treat null as
 * "no valid matcher" rather than a catch-all.
 *
 * When `caseSensitive` is false (default), the regex uses the `i` flag.
 *
 * Word-boundary semantics: `\b` only anchors against `[A-Za-z0-9_]` transitions.
 * Keywords that start or end with a non-word character (e.g. "/api/users")
 * cannot rely on `\b` at those edges, so we emit an anchor-less pattern when
 * the keyword begins or ends with a non-word char — a lexical search is the
 * best we can do without a bespoke tokenizer.
 */
export declare function buildBoundaryRegex(keyword: string, caseSensitive?: boolean): RegExp | null;
//# sourceMappingURL=boundary.d.ts.map