Merge pull request #2369 from vsemozhetbyt/patch-3
Fix typo in 9.7 (Escaping, special characters)
This commit is contained in:
commit
0543fee98d
1 changed files with 1 additions and 1 deletions
|
@ -96,4 +96,4 @@ alert( "Chapter 5.1".match(regexp) ); // 5.1
|
|||
|
||||
- To search for special characters `pattern:[ \ ^ $ . | ? * + ( )` literally, we need to prepend them with a backslash `\` ("escape them").
|
||||
- We also need to escape `/` if we're inside `pattern:/.../` (but not inside `new RegExp`).
|
||||
- When passing a string `new RegExp`, we need to double backslashes `\\`, cause string quotes consume one of them.
|
||||
- When passing a string to `new RegExp`, we need to double backslashes `\\`, cause string quotes consume one of them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue