escapeRegExp
Escapes special characters in a string to safely use it within a regular expression.
Import:
import { escapeRegExp } from 'obsidian-dev-utils/reg-exp';Signature:
function escapeRegExp(str: string): stringParameters:
| Parameter | Type | Description |
|---|---|---|
str | string | The string to escape. |
Returns: string — The escaped string with special characters prefixed with a backslash.