Skip to content

Commit

Permalink
Merge pull request #41 from brettz9/patch-1
Browse files Browse the repository at this point in the history
Rejecting obscure case for comma
  • Loading branch information
benjamingr committed Sep 4, 2018
2 parents d26ef5c + 9f9769a commit e039c25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -67,6 +67,10 @@ We've had [a meeting about this subject](https://github.com/benjamingr/RegExp.es
* **What about the `/` character?**
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.
* **What about the `,` character?**
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).
* **How is Unicode handled?**
Expand Down

0 comments on commit e039c25

Please sign in to comment.