Skip to content

Commit 5be2c04

Browse files
authored
Fix typo in 9.1 (Patterns and flags)
1 parent 79c9513 commit 5be2c04

File tree

1 file changed

+1
-1
lines changed
  • 9-regular-expressions/01-regexp-introduction

1 file changed

+1
-1
lines changed

9-regular-expressions/01-regexp-introduction/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In both cases `regexp` becomes an instance of the built-in `RegExp` class.
2929

3030
The main difference between these two syntaxes is that pattern using slashes `/.../` does not allow for expressions to be inserted (like string template literals with `${...}`). They are fully static.
3131

32-
Slashes are used when we know the regular expression at the code writing time -- and that's the most common situation. While `new RegExp`, is more often used when we need to create a regexp "on the fly" from a dynamically generated string. For instance:
32+
Slashes are used when we know the regular expression at the code writing time -- and that's the most common situation. While `new RegExp` is more often used when we need to create a regexp "on the fly" from a dynamically generated string. For instance:
3333

3434
```js
3535
let tag = prompt("What tag do you want to find?", "h2");

0 commit comments

Comments
 (0)