Fix typo in 9.17 (Methods of RegExp and String)

This commit is contained in:
Vse Mozhe Buty 2020-12-11 00:40:16 +02:00 committed by GitHub
parent 633db6fbe9
commit a8c22e92e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ To find all hyphens, we need to use not the string `"-"`, but a regexp `pattern:
alert( '12-34-56'.replace( *!*/-/g*/!*, ":" ) ) // 12:34:56 alert( '12-34-56'.replace( *!*/-/g*/!*, ":" ) ) // 12:34:56
``` ```
The second argument is a replacement string. We can use special character in it: The second argument is a replacement string. We can use special characters in it:
| Symbols | Action in the replacement string | | Symbols | Action in the replacement string |
|--------|--------| |--------|--------|