Skip to content

Commit b678e75

Browse files
committed
Update README
1 parent 24b47a3 commit b678e75

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ assert.deepStrictEqual(results, [
5353
## RegExp-like String
5454

5555
This library aim to represent RegExp in JSON and use it for ignoring words.
56-
`g`(global) flag is added by default, Because ignoring words is always global in a document.
57-
58-
59-
| Input | Ouput | Note|
60-
| ---- | ---| --- |
61-
| `"str"` | `/str/g`| convert string to regexp with global |
62-
| `"/str/"` | `/str/g`| |
63-
| `"/str/g"` | `/str/g`| Duplicated `g` is just ignored |
64-
| `"/str/i"` | `/str/ig`| |
65-
| `"/str/u"` | `/str/ug`| |
66-
| `"/str/m"` | `/str/mg`| |
67-
| `"/str/y"` | `/str/yg`| |
68-
| ---|---| --- |
69-
| `"/\\d+/"` | `/\d+/g`| You should escape meta character like `\d` |
56+
`g`(global) flag and `u`(unicode) is added by default.
57+
58+
| Input | Ouput | Note |
59+
|--------------|---------|--------------------------------------------|
60+
| `"str"` | `/str/gu` | convert string to regexp with global |
61+
| `"/str/"` | `/str/gu` | |
62+
| `"/str/g"` | `/str/gu` | Duplicated `g` is just ignored |
63+
| `"/str/i"` | `/str/igu` | |
64+
| `"/str/u"` | `/str/ug` | |
65+
| `"/str/m"` | `/str/mgu` | |
66+
| `"/str/y"` | `/str/ygu` | |
67+
| --- | --- | --- |
68+
| `"/\\d+/"` | `/\d+/gu` | You should escape meta character like `\d` |
69+
| `"/(\\d+)/"` | `/\d+/gu` | You can use capture |
7070

7171
:warning: You should escape meta character like `\d` in RegExp-like string.
7272

0 commit comments

Comments
 (0)