mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-06 04:33:42 +00:00
5 lines
183 B
JavaScript
5 lines
183 B
JavaScript
/** Escape text so it can be embedded literally inside a RegExp constructor pattern. */
|
|
export function escapeRegExp(value) {
|
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
}
|