---
id: "regexp-escape"
kind: "web-feature"
canonical: "https://timetostable.com/feature/regexp-escape"
baseline: "low"
bcd_version: "8.1.11"
web_features_version: "3.48.0"
---

# RegExp.escape() (`regexp-escape`)

The RegExp.escape() static method takes a string and replaces any characters that are potentially special characters of a regular expression with equivalent escape sequences. For example, RegExp.escape("[abc]") returns "\\[abc\\]".

- **Group**: Regular expressions
- **Baseline**: Newly Available
- **Newly Available Date**: 2025-05-01
- **Specification**: https://tc39.es/ecma262/multipage/text-processing.html#sec-regexp.escape
- **Constituent BCD keys**: 1

## Browser Support Timeline

| Browser | Version | Release Date |
| --- | --- | --- |
| Safari | 18.2 | 2024-12-11 |
| Safari on iOS | 18.2 | 2024-12-11 |
| Firefox | 134 | 2025-01-07 |
| Firefox for Android | 134 | 2025-01-07 |
| Chrome | 136 | 2025-04-29 |
| Chrome Android | 136 | 2025-04-29 |
| Edge | 136 | 2025-05-01 |

