Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 435ac0b

Browse files
committed
Update EscapeRegExpPattern.md
1 parent b65a165 commit 435ac0b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

data/EscapeRegExpPattern.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1+
See [this issue](https://github.com/benjamingr/RegExp.escape/issues/26#issuecomment-113572232) for more details. In short:
12

23

4+
- EscapeRegExpPattern (as the name implies) takes a pattern and escapes it so that it can be represented as a string.
5+
6+
- What RegExp.escape does is take a string and escapes it so it can be literally represented as a pattern.
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
---------------
22+
323
ECMA 2015 specifies usage of [EscapeRegExpPattern](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-escaperegexppattern)
424
It's being used in [RegExp.prototype.source](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-get-regexp.prototype.source)
525

0 commit comments

Comments
 (0)