This commit is contained in:
Ilya Kantor 2017-03-22 11:50:05 +03:00
parent aa521b9090
commit d1a0659aba
13 changed files with 27 additions and 33 deletions

View file

@ -23,7 +23,7 @@ regexp = new RegExp("pattern", "flags");
...And the short one, using slashes `"/"`:
```js
regexp = /pattern/; // no flags флагов
regexp = /pattern/; // no flags
regexp = /pattern/gmi; // with flags g,m and i (to be covered soon)
```
@ -90,7 +90,7 @@ Regular expressions may have flags that affect the search.
There are only 5 of them in JavaScript:
`i`
: With this flag the search is case-insensitive: no difference between `А` and `а` (see the example below).
: With this flag the search is case-insensitive: no difference between `A` and `a` (see the example below).
`g`
: With this flag the search looks for all matches, without it -- only the first one (we'll see uses in the next chapter).