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

Commit e039c25

Browse files
authored
Merge pull request #41 from brettz9/patch-1
Rejecting obscure case for comma
2 parents d26ef5c + 9f9769a commit e039c25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ We've had [a meeting about this subject](https://github.com/benjamingr/RegExp.es
6767
* **What about the `/` character?**
6868
6969
Empirical data has been collected (see the /data folder) from about a hundred thousand code bases (most popular sites, most popular packages, most depended on packages and Q&A sites) and it was found out that its use case (for `eval`) was not common enough to justify addition.
70+
71+
* **What about the `,` character?**
72+
73+
The one obscure case where this could suggest a cause for escaping, avoiding a range for user-supplied numbers in `new RegExp('a{'+ RegExp.escape('3,5') + '}')`, does not lead to any clearly safer results with escaping, as doing so will cause the sequence `{3\,5}` to be treated as a literal (rather than say throwing with bad input that an application could recover from).
7074
7175
* **How is Unicode handled?**
7276

0 commit comments

Comments
 (0)