Skip to content

Commit 949ce74

Browse files
committed
Update README
1 parent 8a25d8d commit 949ce74

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,18 @@ export type Pattern = {
106106
This textlint rule use RegExp-like string for option value.
107107
:memo: `g`(global) flag and `u`(unicode) is added by default.
108108

109-
| Input | Ouput | Note |
110-
|--------------|---------|--------------------------------------------|
111-
| `"str"` | `/str/gu` | convert string to regexp with global |
112-
| `"/str/"` | `/str/gu` | |
113-
| `"/str/g"` | `/str/gu` | Duplicated `g` is just ignored |
114-
| `"/str/i"` | `/str/igu` | |
115-
| `"/str/u"` | `/str/ug` | |
116-
| `"/str/m"` | `/str/mgu` | |
117-
| `"/str/y"` | `/str/ygu` | |
118-
| --- | --- | --- |
119-
| `"/\\d+/"` | `/\d+/gu` | You should escape meta character like `\d` |
120-
| `"/(\\d+)/"` | `/\d+/gu` | You can use capture |
109+
| Input | Ouput | Note |
110+
|--------------|---------|----------------------------------------------------|
111+
| `"str"` | `/str/gu` | convert string to regexp with global |
112+
| `"/str/"` | `/str/gu` | |
113+
| `"/str/g"` | `/str/gu` | Duplicated `g` is just ignored |
114+
| `"/str/i"` | `/str/igu` | |
115+
| `"/str/u"` | `/str/ug` | |
116+
| `"/str/m"` | `/str/mgu` | |
117+
| `"/str/y"` | `/str/ygu` | |
118+
| --- | --- | --- |
119+
| `"/\\d+/"` | `/\d+/gu` | You should escape meta character like `\d` |
120+
| `"/(\\d+)/"` | `/\d+/gu` | You can use capture. replace `$1` with the capture |
121121

122122
For more information, please see [textlint/regexp-string-matcher README](https://github.com/textlint/regexp-string-matcher#regexp-like-string).
123123

0 commit comments

Comments
 (0)