@lcap/nasl-utils 4.4.0-beta.6 → 4.4.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/index.d.ts +5 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +12 -1
- package/out/index.js.map +1 -1
- package/out/process.d.ts +10 -2
- package/out/process.d.ts.map +1 -1
- package/out/process.js +24 -2
- package/out/process.js.map +1 -1
- package/out/regex-validator/ExpressionLexer.d.ts +92 -0
- package/out/regex-validator/ExpressionLexer.d.ts.map +1 -0
- package/out/regex-validator/ExpressionLexer.js +814 -0
- package/out/regex-validator/ExpressionLexer.js.map +1 -0
- package/out/regex-validator/index.d.ts +5 -0
- package/out/regex-validator/index.d.ts.map +1 -0
- package/out/regex-validator/index.js +16 -0
- package/out/regex-validator/index.js.map +1 -0
- package/out/regex-validator/presetRegexr.d.ts +6 -0
- package/out/regex-validator/presetRegexr.d.ts.map +1 -0
- package/out/regex-validator/presetRegexr.js +30 -0
- package/out/regex-validator/presetRegexr.js.map +1 -0
- package/out/regex-validator/profiles/core.d.ts +347 -0
- package/out/regex-validator/profiles/core.d.ts.map +1 -0
- package/out/regex-validator/profiles/core.js +392 -0
- package/out/regex-validator/profiles/core.js.map +1 -0
- package/out/regex-validator/profiles/javascript.d.ts +12 -0
- package/out/regex-validator/profiles/javascript.d.ts.map +1 -0
- package/out/regex-validator/profiles/javascript.js +135 -0
- package/out/regex-validator/profiles/javascript.js.map +1 -0
- package/out/regex-validator/profiles/pcre.d.ts +44 -0
- package/out/regex-validator/profiles/pcre.d.ts.map +1 -0
- package/out/regex-validator/profiles/pcre.js +62 -0
- package/out/regex-validator/profiles/pcre.js.map +1 -0
- package/out/regex-validator/profiles/profiles.d.ts +6 -0
- package/out/regex-validator/profiles/profiles.d.ts.map +1 -0
- package/out/regex-validator/profiles/profiles.js +46 -0
- package/out/regex-validator/profiles/profiles.js.map +1 -0
- package/out/regex-validator/reference_content.d.ts +3 -0
- package/out/regex-validator/reference_content.d.ts.map +1 -0
- package/out/regex-validator/reference_content.js +790 -0
- package/out/regex-validator/reference_content.js.map +1 -0
- package/out/regex-validator/utils/Utils.d.ts +5 -0
- package/out/regex-validator/utils/Utils.d.ts.map +1 -0
- package/out/regex-validator/utils/Utils.js +16 -0
- package/out/regex-validator/utils/Utils.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
RegExr: Learn, Build, & Test RegEx
|
|
4
|
+
Copyright (C) 2017 gskinner.com, inc.
|
|
5
|
+
|
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
// this is just raw content for the Reference.
|
|
21
|
+
// right now all examples are executed in-browser, so they need to be compatible. Maybe swap to XRegExp at some point.
|
|
22
|
+
// TODO: rewrite to use multiline template literals?
|
|
23
|
+
let reference_content = {}, o = reference_content;
|
|
24
|
+
exports.default = reference_content;
|
|
25
|
+
o.label = "RegEx Reference";
|
|
26
|
+
o.id = "reference";
|
|
27
|
+
o.search = true,
|
|
28
|
+
o.desc = `Information on all of the tokens available to create regular expressions.
|
|
29
|
+
<p>Double-click an item in the list to insert it into your Expression.</p>
|
|
30
|
+
<p>Click the arrow beside an example to load it.</p>`;
|
|
31
|
+
o.kids = [
|
|
32
|
+
{
|
|
33
|
+
label: "Character classes",
|
|
34
|
+
id: "charclasses",
|
|
35
|
+
desc: "Character classes match a character from a specific set. There are a number of predefined character classes and you can also define your own sets.",
|
|
36
|
+
kids: [
|
|
37
|
+
{
|
|
38
|
+
id: "set",
|
|
39
|
+
label: "character set",
|
|
40
|
+
desc: "匹配集合中的任意字符。",
|
|
41
|
+
example: ["[aeiou]", "glib jocks vex dwarves!"],
|
|
42
|
+
token: "[ABC]"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "setnot",
|
|
46
|
+
label: "negated set",
|
|
47
|
+
desc: "匹配任何不在集合中的字符。",
|
|
48
|
+
example: ["[^aeiou]", "glib jocks vex dwarves!"],
|
|
49
|
+
token: "[^ABC]"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "range",
|
|
53
|
+
tip: "匹配字符在范围 {{getChar(prev)}} 到 {{getChar(next)}} 之间(字符代码 {{prev.code}} 到 {{next.code}})。{{getInsensitive()}}",
|
|
54
|
+
example: ["[g-s]", "abcdefghijklmnopqrstuvwxyz"],
|
|
55
|
+
desc: "匹配字符代码在两个指定字符之间的字符(包括这两个字符)。",
|
|
56
|
+
token: "[A-Z]"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "posixcharclass",
|
|
60
|
+
tip: "匹配 '{{value}}' POSIX 类中的任何字符。",
|
|
61
|
+
label: "POSIX class",
|
|
62
|
+
desc: "匹配指定 POSIX 类中的任意字符。必须放在字符集内。例如,<code>[[:alnum:]$]</code> 可以匹配字母数字字符和 <code>$</code>。",
|
|
63
|
+
ext: "<p>有关类的列表,请参阅 <a href='http://www.pcre.org/original/doc/html/pcrepattern.html'>PCRE 规范</a>.</p>",
|
|
64
|
+
token: "[:alnum:]"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "dot",
|
|
68
|
+
tip: "匹配任何字符 {{getDotAll()}}。",
|
|
69
|
+
desc: "匹配除换行符以外的任意字符。",
|
|
70
|
+
ext: " 等价于 <code>[^\\n\\r]</code>。",
|
|
71
|
+
example: [".", "glib jocks vex dwarves!"],
|
|
72
|
+
token: "."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "matchanyset",
|
|
76
|
+
label: "match any",
|
|
77
|
+
desc: "一个字符集,可用于在不启用 dotall 标志 (<code>s</code>) 的情况下匹配任意字符,包括换行符" +
|
|
78
|
+
"<p>另一种形式是 <code>[^]</code>,但并非所有浏览器都支持。</p>",
|
|
79
|
+
example: ["[\\s\\S]", "glib jocks vex dwarves!"],
|
|
80
|
+
token: "[\\s\\S]"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "unicodegrapheme",
|
|
84
|
+
label: "unicode grapheme",
|
|
85
|
+
desc: "匹配任意单个 Unicode 字素(即字符)。",
|
|
86
|
+
ext: " 这包括换行符(无论是否启用 dotall 模式)和作为多个代码点编码的字素。",
|
|
87
|
+
token: "\\X"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "word",
|
|
91
|
+
desc: "匹配任意单词字符(字母数字和下划线)。",
|
|
92
|
+
ext: " 仅匹配低 ASCII 字符(不包括重音或非罗马字符)。等价于 <code>[A-Za-z0-9_]</code>",
|
|
93
|
+
example: ["\\w", "bonjour, mon frère"],
|
|
94
|
+
token: "\\w"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "notword",
|
|
98
|
+
label: "not word",
|
|
99
|
+
desc: "匹配任意非单词字符(字母数字和下划线)。",
|
|
100
|
+
ext: " 等价于 <code>[^A-Za-z0-9_]</code>",
|
|
101
|
+
example: ["\\W", "bonjour, mon frère"],
|
|
102
|
+
token: "\\W"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "digit",
|
|
106
|
+
desc: "匹配任意数字字符(0-9)。",
|
|
107
|
+
ext: " 等价于 <code>[0-9]</code>。",
|
|
108
|
+
example: ["\\d", "+1-(444)-555-1234"],
|
|
109
|
+
token: "\\d"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "notdigit",
|
|
113
|
+
label: "not digit",
|
|
114
|
+
desc: "匹配任意非数字字符(0-9)。",
|
|
115
|
+
ext: " 等价于 <code>[^0-9]</code>。",
|
|
116
|
+
example: ["\\D", "+1-(444)-555-1234"],
|
|
117
|
+
token: "\\D"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "whitespace",
|
|
121
|
+
desc: "匹配任意空白字符(空格、制表符、换行符)。",
|
|
122
|
+
example: ["\\s", "glib jocks vex dwarves!"],
|
|
123
|
+
token: "\\s"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "notwhitespace",
|
|
127
|
+
label: "not whitespace",
|
|
128
|
+
desc: "匹配任意非空白字符(空格、制表符、换行符)。",
|
|
129
|
+
example: ["\\S", "glib jocks vex dwarves!"],
|
|
130
|
+
token: "\\S"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "hwhitespace",
|
|
134
|
+
label: "horizontal whitespace",
|
|
135
|
+
desc: "匹配任意水平空白字符(空格、制表符)。",
|
|
136
|
+
token: "\\h"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: "nothwhitespace",
|
|
140
|
+
label: "not horizontal whitespace",
|
|
141
|
+
desc: "匹配任意非水平空白字符(空格、制表符)。",
|
|
142
|
+
token: "\\H"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "vwhitespace",
|
|
146
|
+
label: "vertical whitespace",
|
|
147
|
+
desc: "匹配任意垂直空白字符(换行符)。",
|
|
148
|
+
token: "\\v"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "notvwhitespace",
|
|
152
|
+
label: "not vertical whitespace",
|
|
153
|
+
desc: "匹配任意非垂直空白字符(换行符)。",
|
|
154
|
+
token: "\\V"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "linebreak",
|
|
158
|
+
label: "line break",
|
|
159
|
+
desc: "匹配任意换行符,包括 CRLF 对及单独的 CR / LF。",
|
|
160
|
+
token: "\\R"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: "notlinebreak",
|
|
164
|
+
label: "not line break",
|
|
165
|
+
desc: "匹配任意非换行符字符。",
|
|
166
|
+
ext: " 类似于点 (<code>.</code>) 但不受 dotall 标志 (<code>s</code>) 的影响。",
|
|
167
|
+
token: "\\N"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: "unicodecat",
|
|
171
|
+
tip: "匹配 '{{getUniCat()}}' Unicode 类别中的任何字符。",
|
|
172
|
+
label: "unicode category",
|
|
173
|
+
desc: "匹配指定 Unicode 类别中的字符。例如,<code>\\p{Ll}</code> 可匹配任意小写字母。",
|
|
174
|
+
ext: "<p>有关类的列表,请参阅 <a href='http://www.pcre.org/original/doc/html/pcrepattern.html'>PCRE 规范</a>.</p>" +
|
|
175
|
+
"<p>此功能有多种语法:</p><p><code>\\p{L}</code> <code>\\pL</code></p>",
|
|
176
|
+
token: "\\p{L}"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "notunicodecat",
|
|
180
|
+
tip: "匹配任何不在 '{{getUniCat()}}' Unicode 类别中的字符。",
|
|
181
|
+
label: "not unicode category",
|
|
182
|
+
desc: "匹配任何不在指定 Unicode 类别中的字符。",
|
|
183
|
+
ext: "<p>有关类的列表,请参阅 <a href='http://www.pcre.org/original/doc/html/pcrepattern.html'>PCRE 规范</a>.</p>" +
|
|
184
|
+
"<p>此功能有多种语法:</p><p><code>\\P{L}</code> <code>\\p{^L}</code> <code>\\PL</code></p>",
|
|
185
|
+
token: "\\P{L}"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "unicodescript",
|
|
189
|
+
tip: "匹配 '{{value}}' Unicode 脚本中的任何字符。",
|
|
190
|
+
label: "unicode script",
|
|
191
|
+
desc: "匹配指定 Unicode 脚本中的任何字符。例如,<code>\\p{Arabic}</code> 将匹配阿拉伯脚本中的字符。",
|
|
192
|
+
ext: "<p>有关脚本的列表,请参阅 <a href='http://www.pcre.org/original/doc/html/pcrepattern.html'>PCRE 规范</a>。</p>",
|
|
193
|
+
token: "\\p{Han}"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "notunicodescript",
|
|
197
|
+
tip: "匹配任何不在 '{{value}}' Unicode 脚本中的字符。",
|
|
198
|
+
label: "not unicode script",
|
|
199
|
+
desc: "匹配任何不在指定 Unicode 脚本中的字符。",
|
|
200
|
+
ext: "<p>有关脚本的列表,请参阅 <a href='http://www.pcre.org/original/doc/html/pcrepattern.html'>PCRE 规范</a>。</p>" +
|
|
201
|
+
"<p>此功能有多种语法:</p><p><code>\\P{Han}</code> <code>\\p{^Han}</code>",
|
|
202
|
+
token: "\\P{Han}"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: "Anchors",
|
|
208
|
+
id: "anchors",
|
|
209
|
+
desc: "锚点的独特之处在于它们匹配字符串中的一个位置,而不是一个字符。",
|
|
210
|
+
kids: [
|
|
211
|
+
{
|
|
212
|
+
id: "bos",
|
|
213
|
+
label: "beginning of string",
|
|
214
|
+
desc: "匹配字符串的开头。",
|
|
215
|
+
ext: " 不像 <code>^</code>,这不受多行标志(<code>m</code>)的影响。它匹配一个位置,而不是一个字符。",
|
|
216
|
+
token: "\\A"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: "eos",
|
|
220
|
+
label: "end of string",
|
|
221
|
+
desc: "匹配字符串的结尾。",
|
|
222
|
+
ext: " 不像 <code>$</code>,这不受多行标志(<code>m</code>)的影响。它匹配一个位置,而不是一个字符。",
|
|
223
|
+
token: "\\Z"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "abseos",
|
|
227
|
+
label: "strict end of string",
|
|
228
|
+
desc: "匹配字符串的结尾。不像 <code>$</code> 或 <code>\\Z</code>,它不允许有尾随的换行符。",
|
|
229
|
+
ext: " 这不受多行标志(<code>m</code>)的影响。它匹配一个位置,而不是一个字符。",
|
|
230
|
+
token: "\\z"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: "bof",
|
|
234
|
+
label: "beginning",
|
|
235
|
+
desc: "匹配字符串的开头,或者在启用多行标志(<code>m</code>)时匹配行的开头。",
|
|
236
|
+
ext: " 这匹配一个位置,而不是一个字符。",
|
|
237
|
+
example: ["^\\w+", "she sells seashells"],
|
|
238
|
+
token: "^"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: "eof",
|
|
242
|
+
label: "end",
|
|
243
|
+
desc: "匹配字符串的结尾,或者在启用多行标志(<code>m</code>)时匹配行的结尾。",
|
|
244
|
+
ext: " 这匹配一个位置,而不是一个字符。",
|
|
245
|
+
example: ["\\w+$", "she sells seashells"],
|
|
246
|
+
token: "$"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: "wordboundary",
|
|
250
|
+
label: "word boundary",
|
|
251
|
+
desc: "匹配单词字符和非单词字符之间的位置(开始/结束位置)。",
|
|
252
|
+
ext: " 更多信息请参阅单词字符类(<code>\w</code>)。",
|
|
253
|
+
example: ["s\\b", "she sells seashells"],
|
|
254
|
+
token: "\\b"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "notwordboundary",
|
|
258
|
+
label: "not word boundary",
|
|
259
|
+
desc: "匹配任何非单词边界的位置。",
|
|
260
|
+
ext: " 这匹配一个位置,而不是一个字符。",
|
|
261
|
+
example: ["s\\B", "she sells seashells"],
|
|
262
|
+
token: "\\B"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "prevmatchend",
|
|
266
|
+
label: "previous match end",
|
|
267
|
+
desc: "匹配上一个匹配的结束位置。",
|
|
268
|
+
ext: " 这匹配一个位置,而不是一个字符。",
|
|
269
|
+
token: "\\G"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: "Escaped characters",
|
|
275
|
+
id: "escchars",
|
|
276
|
+
desc: "转义序列可用于插入保留、特殊和 Unicode 字符。所有转义字符均以 <code>\\</code> 字符开头。",
|
|
277
|
+
kids: [
|
|
278
|
+
{
|
|
279
|
+
id: "reservedchar",
|
|
280
|
+
label: "reserved characters",
|
|
281
|
+
desc: "以下字符具有特殊含义,应在前面加上 <code>\\</code>(反斜杠)以表示字面字符:" +
|
|
282
|
+
"<p><code>{{getEscChars()}}</code></p>" +
|
|
283
|
+
"<p>在字符集中,仅 <code>\\</code>、<code>-</code> 和 <code>]</code> 需要转义。</p>",
|
|
284
|
+
example: ["\\+", "1 + 1 = 2"],
|
|
285
|
+
token: "\\+",
|
|
286
|
+
show: true
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "escoctal",
|
|
290
|
+
label: "octal escape",
|
|
291
|
+
desc: "八进制转义字符,形式为 <code>\\000</code>。",
|
|
292
|
+
ext: " 值必须小于 255 (<code>\\377</code>).", // PCRE profile adds to ext.
|
|
293
|
+
example: ["\\251", "RegExr is \u00A92014"],
|
|
294
|
+
token: "\\000"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
id: "eschexadecimal",
|
|
298
|
+
label: "hexadecimal escape",
|
|
299
|
+
desc: "十六进制转义字符,形式为 <code>\\xFF</code>。",
|
|
300
|
+
example: ["\\xA9", "RegExr is \u00A92014"],
|
|
301
|
+
token: "\\xFF"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: "escunicodeu",
|
|
305
|
+
label: "unicode escape",
|
|
306
|
+
desc: "Unicode转义字符,形式为 <code>\\uFFFF</code>",
|
|
307
|
+
example: ["\\u00A9", "RegExr is \u00A92014"],
|
|
308
|
+
token: "\\uFFFF"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "escunicodeub",
|
|
312
|
+
label: "extended unicode escape",
|
|
313
|
+
desc: "Unicode转义字符,形式为 <code>\\u{FFFF}</code>。",
|
|
314
|
+
ext: " 支持任意数量的十六进制数字的完整 Unicode 点转义范围。<p>需要 Unicode 标志(<code>u</code>)。</p>",
|
|
315
|
+
token: "\\u{FFFF}"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: "escunicodexb",
|
|
319
|
+
label: "unicode escape",
|
|
320
|
+
desc: "Unicode转义字符,形式为 <code>\\x{FF}</code>。",
|
|
321
|
+
token: "\\x{FF}"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: "esccontrolchar",
|
|
325
|
+
label: "control character escape",
|
|
326
|
+
desc: "转义控制字符,形式为 <code>\\cZ</code>。",
|
|
327
|
+
ext: " 这可以从 <code>\\cA</code>(SOH,字符代码 1)到 <code>\\cZ</code>(SUB,字符代码 26)不等。<h1>示例:</h1><code>\\cI</code> 匹配 TAB(字符代码 9)。",
|
|
328
|
+
token: "\\cI"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: "escsequence",
|
|
332
|
+
label: "escape sequence",
|
|
333
|
+
tip: "匹配字面字符串 '{{value}}'.",
|
|
334
|
+
desc: "所有在 <code>\\Q</code> 和 <code>\\E</code> 之间的字符都被解释为字面字符串。如果省略 <code>\\E</code>,则持续匹配到表达式的末尾。",
|
|
335
|
+
ext: " 例如,表达式 <code>/\\Q(?.)\\E/</code> 将匹配字符串 <code>(?.)</code>。",
|
|
336
|
+
token: "\\Q...\\E"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
label: "Groups & References",
|
|
342
|
+
id: "groups",
|
|
343
|
+
desc: "分组允许您将一系列标记组合在一起以便一起操作。捕获组可以通过反向引用进行引用,并在结果中单独访问。",
|
|
344
|
+
kids: [
|
|
345
|
+
{
|
|
346
|
+
id: "group",
|
|
347
|
+
label: "capturing group",
|
|
348
|
+
desc: "将多个标记组合在一起,并创建一个捕获组以提取子字符串或使用反向引用。",
|
|
349
|
+
example: ["(ha)+", "hahaha haa hah!"],
|
|
350
|
+
token: "(ABC)"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
id: "namedgroup",
|
|
354
|
+
label: "named capturing group",
|
|
355
|
+
tip: "创建一个名为 '{{name}}' 的捕获组。",
|
|
356
|
+
desc: "创建一个可以通过指定名称进行引用的捕获组。",
|
|
357
|
+
ext: "<p>有多种语法可以实现此功能:</p><p><code>(?'name'ABC)</code> <code>(?P<name>ABC)</code> <code>(?<name>ABC)</code></p>",
|
|
358
|
+
token: "(?<name>ABC)"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
id: "namedref",
|
|
362
|
+
label: "named reference",
|
|
363
|
+
tip: "匹配名为 '{{group.name}}' 的捕获组的结果。",
|
|
364
|
+
desc: "匹配一个命名捕获组的结果。",
|
|
365
|
+
ext: "<p>有多种语法可以实现此功能:</p><p><code>\\k'name'</code> <code>\\k<name></code> <code>\\k{name}</code> <code>\\g{name}</code> <code>(?P=name)</code></p>",
|
|
366
|
+
token: "\\k'name'"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
id: "numref",
|
|
370
|
+
label: "numeric reference",
|
|
371
|
+
tip: "匹配捕获组 #{{group.num}} 的结果。",
|
|
372
|
+
desc: "匹配一个捕获组的结果。例如 <code>\\1</code> 匹配第一个捕获组的结果 & <code>\\3</code> 匹配第三个。",
|
|
373
|
+
// PCRE adds relative and alternate syntaxes in ext
|
|
374
|
+
example: ["(\\w)a\\1", "hah dad bad dab gag gab"],
|
|
375
|
+
token: "\\1"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
id: "branchreset",
|
|
379
|
+
label: "branch reset group",
|
|
380
|
+
desc: "定义共享相同组号的交替组。",
|
|
381
|
+
ext: "<p>例如,在 <code>(?|(a)|(b))</code> 中,两个组 (a 和 b) 都将被计算为组 #1。</p>",
|
|
382
|
+
token: "(?|(a)|(b))"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: "noncapgroup",
|
|
386
|
+
label: "non-capturing group",
|
|
387
|
+
desc: "将多个标记组合在一起而不创建捕获组。",
|
|
388
|
+
example: ["(?:ha)+", "hahaha haa hah!"],
|
|
389
|
+
token: "(?:ABC)"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: "atomic",
|
|
393
|
+
label: "atomic group",
|
|
394
|
+
desc: "非捕获组,一旦匹配就会丢弃回溯位置。",
|
|
395
|
+
ext: "<p>例如,<code>/(?>ab|a)b/</code> 将匹配 <code>abb</code> 但不匹配 <code>ab</code>,因为一旦 <code>ab</code> 选项匹配成功,原子组就会阻止回溯以重试 <code>a</code> 选项。</p>",
|
|
396
|
+
token: "(?>ABC)"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
id: "define",
|
|
400
|
+
desc: "用于定义命名组,以便用作子例程,而不将其包含在匹配中。",
|
|
401
|
+
ext: "<p>例如,<code>/A(?(DEFINE)(?'foo'Z))B\\g'foo'/</code> 将匹配 <code>ABZ</code>,因为定义组在匹配中被忽略,除了定义稍后通过 <code>\\g'foo'</code> 引用的 <code>foo</code> 子例程。</p>",
|
|
402
|
+
token: "(?(DEFINE)(?'foo'ABC))"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
id: "numsubroutine",
|
|
406
|
+
label: "numeric subroutine",
|
|
407
|
+
tip: "匹配捕获组 #{{group.num}} 中的表达式。",
|
|
408
|
+
desc: "匹配一个捕获组中的表达式。与引用相比,引用匹配的是结果。" +
|
|
409
|
+
" 例如 <code>/(a|b)\\g'1'/</code> 可以匹配 <code>ab</code>,因为表达式 <code>a|b</code> 会再次被求值。",
|
|
410
|
+
ext: "<p>有多种语法可以实现此功能: <code>\\g<1></code> <code>\\g'1'</code> <code>(?1)</code>。</p>" +
|
|
411
|
+
"<p>相对值可以用 <code>+</code> 或 <code>-</code> 前缀。例如 <code>\\g<-1></code> 将匹配引用前面的组。</p>",
|
|
412
|
+
token: "\\g'1'"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "namedsubroutine",
|
|
416
|
+
label: "named subroutine",
|
|
417
|
+
tip: "匹配名为 '{{group.name}}' 的捕获组中的表达式。",
|
|
418
|
+
desc: "匹配一个捕获组中的表达式。与引用相比,引用匹配的是结果。",
|
|
419
|
+
ext: "<p>有多种语法可以实现此功能: <code>\\g<name></code> <code>\\g'name'</code> <code>(?&name)</code> <code>(?P>name)</code>。</p>",
|
|
420
|
+
token: "\\g'name'"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
label: "Lookaround",
|
|
426
|
+
id: "lookaround",
|
|
427
|
+
desc: "环视允许您在主模式之前(后顾)或之后(前瞻)匹配一个组,而不将其包含在结果中。" +
|
|
428
|
+
"<p>负向环视指定一个组,该组不能在模式之前或之后匹配。</p>",
|
|
429
|
+
kids: [
|
|
430
|
+
{
|
|
431
|
+
id: "poslookahead",
|
|
432
|
+
label: "positive lookahead",
|
|
433
|
+
desc: "匹配主表达式后面的组,而不将其包含在结果中。",
|
|
434
|
+
example: ["\\d(?=px)", "1pt 2px 3em 4px"],
|
|
435
|
+
token: "(?=ABC)"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "neglookahead",
|
|
439
|
+
label: "negative lookahead",
|
|
440
|
+
desc: "指定一个组,该组不能在主表达式之后匹配(如果匹配,则结果被丢弃)。",
|
|
441
|
+
example: ["\\d(?!px)", "1pt 2px 3em 4px"],
|
|
442
|
+
token: "(?!ABC)"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: "poslookbehind",
|
|
446
|
+
label: "positive lookbehind",
|
|
447
|
+
desc: "匹配主表达式前面的组,而不将其包含在结果中。",
|
|
448
|
+
token: "(?<=ABC)"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
id: "neglookbehind",
|
|
452
|
+
label: "negative lookbehind",
|
|
453
|
+
desc: "指定一个组,该组不能在主表达式之前匹配(如果匹配,则结果被丢弃)。",
|
|
454
|
+
token: "(?<!ABC)"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: "keepout",
|
|
458
|
+
label: "keep out",
|
|
459
|
+
desc: "将到目前为止匹配的文本排除在返回的匹配结果之外,基本上丢弃到此为止的匹配。",
|
|
460
|
+
ext: "例如 <code>/o\\Kbar/</code> 将在字符串 <code>foobar</code> 中匹配 <code>bar</code>",
|
|
461
|
+
token: "\\K"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
label: "Quantifiers & Alternation",
|
|
467
|
+
id: "quants",
|
|
468
|
+
desc: "量词指示前面的标记必须匹配一定次数。默认情况下,量词是贪婪的,将尽可能多地匹配字符。" +
|
|
469
|
+
"<hr/>交替充当布尔 OR,匹配一个序列或另一个。",
|
|
470
|
+
kids: [
|
|
471
|
+
{
|
|
472
|
+
id: "plus",
|
|
473
|
+
desc: "匹配前一个标记 1 次或多次。",
|
|
474
|
+
example: ["b\\w+", "b be bee beer beers"],
|
|
475
|
+
token: "+"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
id: "star",
|
|
479
|
+
desc: "匹配前一个标记 0 次或多次。",
|
|
480
|
+
example: ["b\\w*", "b be bee beer beers"],
|
|
481
|
+
token: "*"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
id: "quant",
|
|
485
|
+
label: "quantifier",
|
|
486
|
+
tip: "匹配 {{getQuant()}} 的前一个标记。",
|
|
487
|
+
desc: "匹配前一个标记的指定数量。 " +
|
|
488
|
+
"<code>{1,3}</code> 将匹配 1 到 3 次。 " +
|
|
489
|
+
"<code>{3}</code> 将匹配 3 次。 " +
|
|
490
|
+
"<code>{3,}</code> 将匹配 3 次或更多。 ",
|
|
491
|
+
example: ["b\\w{2,3}", "b be bee beer beers"],
|
|
492
|
+
token: "{1,3}"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
id: "opt",
|
|
496
|
+
label: "optional",
|
|
497
|
+
desc: "匹配前一个标记 0 次或 1 次,有效地使其成为可选的。",
|
|
498
|
+
example: ["colou?r", "color colour"],
|
|
499
|
+
token: "?"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: "lazy",
|
|
503
|
+
tip: "使前面的量词变为 {{getLazy()}}, 导致它尽可能少地匹配 {{getLazyFew()}} 个字符。",
|
|
504
|
+
desc: "使前面的量词变为懒惰,导致它尽可能少地匹配字符。",
|
|
505
|
+
ext: " 默认情况下,量词是贪婪的,将匹配尽可能多的字符。",
|
|
506
|
+
example: ["b\\w+?", "b be bee beer beers"],
|
|
507
|
+
token: "?"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
id: "possessive",
|
|
511
|
+
desc: "Makes the preceding quantifier possessive. It will match as many characters as possible, and will not release them to match subsequent tokens.",
|
|
512
|
+
ext: "<p>For example <code>/.*a/</code> would match <code>aaa</code>, but <code>/.*+a/</code> would not, because the repeating dot would match and not release the last character to match <code>a</code>.</p>",
|
|
513
|
+
token: "+"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
id: "alt",
|
|
517
|
+
label: "alternation",
|
|
518
|
+
desc: "充当布尔 OR。匹配 <code>|</code> 之前或之后的表达式。",
|
|
519
|
+
ext: "<p>它可以在组内或整个表达式上操作。模式将按顺序进行测试。</p>",
|
|
520
|
+
example: ["b(a|e|i)d", "bad bud bod bed bid"],
|
|
521
|
+
token: "|"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
label: "Special",
|
|
527
|
+
id: "other",
|
|
528
|
+
desc: "不在其它类别的标记",
|
|
529
|
+
kids: [
|
|
530
|
+
{
|
|
531
|
+
id: "comment",
|
|
532
|
+
desc: "允许您在表达式中插入注释,在查找匹配时会被忽略。",
|
|
533
|
+
token: "(?#foo)"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
id: "conditional",
|
|
537
|
+
desc: "根据是否匹配到一个环视,有条件地匹配两个选项之一",
|
|
538
|
+
ext: "<p>例如,<code>/(?(?=a)ab|..)/</code> 将匹配 <code>ab</code> 和 <code>zx</code> 但不匹配 <code>ax</code>,因为如果第一个字符匹配条件 <code>a</code>,则会评估模式 <code>ab</code>。</p>" +
|
|
539
|
+
"<p>可以将任何环视用作条件。前瞻将从条件的开始处开始后续匹配,后顾将在其后开始。</p>",
|
|
540
|
+
token: "(?(?=A)B|C)"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: "conditionalgroup",
|
|
544
|
+
label: "group conditional",
|
|
545
|
+
desc: "根据组 '{{name}}' 是否匹配,条件性地匹配两个选项之一。",
|
|
546
|
+
ext: "<p>例如,<code>/(z)?(?(1)a|b)/</code> 将匹配 <code>za</code> 因为第一个捕获组成功匹配 <code>z</code>,这导致条件匹配第一个选项 <code>a</code>。</p>" +
|
|
547
|
+
"<p>相同的模式也将单独匹配 <code>b</code>,因为组 1 不匹配,因此它会尝试匹配第二个选项 <code>b</code>。</p>" +
|
|
548
|
+
"<p>您可以通过名称、编号或相对位置(例如 <code>-1</code>)引用组。</p>",
|
|
549
|
+
token: "(?(1)B|C)"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: "recursion",
|
|
553
|
+
desc: "尝试在当前位置再次匹配完整表达式。",
|
|
554
|
+
ext: "<p>例如,<code>/a(?R)?b/</code> 将匹配任意数量的 <code>a</code> 后跟相同数量的 <code>z</code>:完整文本 <code>az</code> 或 <code>aaaazzzz</code>,但不匹配 <code>azzz</code>。</p>" +
|
|
555
|
+
"<p>此功能有多种语法:</p><p><code>(?R)</code> <code>(?0)</code> <code>\\g<0></code> <code>\\g'0'</code></p>",
|
|
556
|
+
token: "(?R)"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
id: "mode",
|
|
560
|
+
label: "mode modifier",
|
|
561
|
+
tip: "{{~getDesc()}}{{~getModes()}}",
|
|
562
|
+
desc: "启用或禁用剩余表达式的模式。",
|
|
563
|
+
ext: "匹配模式通常映射到表达式标志。例如 <code>(?i)</code> 将为表达式的其余部分启用不区分大小写。" +
|
|
564
|
+
"<p>可以指定多个修饰符,任何跟随 <code>-</code> 的修饰符将被禁用。例如 <code>(?im-s)</code> 将启用不区分大小写和多行模式,并禁用点任意模式。</p>" +
|
|
565
|
+
"<p>支持的修饰符有:<code>i</code> - 不区分大小写,<code>s</code> - 点任意,<code>m</code> - 多行,<code>x</code> - 自由间距,<code>J</code> - 允许重复名称,<code>U</code> - 非贪婪。</p>",
|
|
566
|
+
token: "(?i)"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
label: "Substitution",
|
|
572
|
+
desc: "这些标记用于替换字符串中以插入匹配的不同部分。",
|
|
573
|
+
target: "subst",
|
|
574
|
+
id: "subst",
|
|
575
|
+
kids: [
|
|
576
|
+
{
|
|
577
|
+
id: "subst_$&match",
|
|
578
|
+
label: "match",
|
|
579
|
+
desc: "插入匹配的文本。",
|
|
580
|
+
token: "$&"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
id: "subst_0match",
|
|
584
|
+
label: "match",
|
|
585
|
+
desc: "插入匹配的文本。",
|
|
586
|
+
ext: "<p>此功能有多种语法:</p><p><code>$0</code> <code>\\0</code> <code>\\{0}</code></p>",
|
|
587
|
+
token: "$0"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
id: "subst_group",
|
|
591
|
+
label: "capture group",
|
|
592
|
+
tip: "插入捕获组 #{{group.num}} 的结果。",
|
|
593
|
+
desc: "插入指定捕获组的结果。例如,<code>$3</code> 将插入第三个捕获组。",
|
|
594
|
+
// NOTE: javascript profile overrides this:
|
|
595
|
+
ext: "<p>此功能有多种语法:</p><p><code>$1</code> <code>\\1</code> <code>\\{1}</code></p>",
|
|
596
|
+
token: "$1"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
id: "subst_$before",
|
|
600
|
+
label: "before match",
|
|
601
|
+
desc: "插入匹配之前的源字符串部分。",
|
|
602
|
+
token: "$`"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
id: "subst_$after",
|
|
606
|
+
label: "after match",
|
|
607
|
+
desc: "插入匹配之后的源字符串部分。",
|
|
608
|
+
token: "$'"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
id: "subst_$esc",
|
|
612
|
+
label: "escaped $",
|
|
613
|
+
desc: "插入美元符号字符 ($)。",
|
|
614
|
+
token: "$$"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: "subst_esc",
|
|
618
|
+
label: "escaped characters",
|
|
619
|
+
token: "\\n",
|
|
620
|
+
desc: "出于方便,以下转义字符在 RegExr 的替换字符串中受支持:<code>\\n</code>、<code>\\r</code>、<code>\\t</code>、<code>\\\\</code> 和 Unicode 转义 <code>\\uFFFF</code>。这可能会因您的部署环境而异。"
|
|
621
|
+
}
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: "flags",
|
|
626
|
+
label: "Flags",
|
|
627
|
+
tooltip: "表达式标志改变了表达式的解释方式。单击以编辑。",
|
|
628
|
+
desc: "表达式标志改变了表达式的解释方式。标志跟随表达式的闭合斜杠(例如 <code>/.+/igm</code>)。",
|
|
629
|
+
target: "flags",
|
|
630
|
+
kids: [
|
|
631
|
+
{
|
|
632
|
+
id: "caseinsensitive",
|
|
633
|
+
label: "ignore case",
|
|
634
|
+
desc: "使整个表达式不区分大小写。",
|
|
635
|
+
ext: "例如,<code>/aBc/i</code> 将匹配 <code>AbC</code>。",
|
|
636
|
+
token: "i"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
id: "global",
|
|
640
|
+
label: "global search",
|
|
641
|
+
tip: "保留最后一次匹配的索引,允许迭代搜索。",
|
|
642
|
+
desc: "保留最后一次匹配的索引,允许后续搜索从上一次匹配的末尾开始。" +
|
|
643
|
+
"<p>如果没有全局标志,后续搜索将返回相同的匹配。</p><hr/>" +
|
|
644
|
+
"RegExr 仅在全局标志禁用时搜索单个匹配,以避免无限匹配错误。",
|
|
645
|
+
token: "g"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
id: "multiline",
|
|
649
|
+
tip: "行首/行尾锚点 (<b>^</b>/<b>$</b>) 将匹配行的开始/结束。",
|
|
650
|
+
desc: "当启用多行标志时,行首和行尾锚点 (<code>^</code> 和 <code>$</code>) 将匹配行的开始和结束,而不是整个字符串的开始和结束。" +
|
|
651
|
+
"<p>请注意,诸如 <code>/^[\\s\\S]+$/m</code> 的模式可能会返回跨越多行的匹配,因为锚点将匹配 <b>任何</b> 行的开始/结束。</p>",
|
|
652
|
+
token: "m"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
id: "unicode",
|
|
656
|
+
tip: "启用 <code>\\x{FFFFF}</code> Unicode 转义。",
|
|
657
|
+
desc: "当启用 Unicode 标志时,可以使用扩展的 Unicode 转义形式 <code>\\x{FFFFF}</code>。" +
|
|
658
|
+
"<p>这还会使其他转义变得更严格,导致未识别的转义(例如 <code>\\j</code>)抛出错误。</p>",
|
|
659
|
+
token: "u"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
id: "sticky",
|
|
663
|
+
desc: "该表达式将仅从其 lastIndex 位置进行匹配,并在设置时忽略全局 (<code>g</code>) 标志。",
|
|
664
|
+
ext: " 因为 RegExr 中的每个搜索都是离散的,因此此标志对显示结果没有进一步影响。",
|
|
665
|
+
token: "y"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: "dotall",
|
|
669
|
+
desc: "Dot (<code>.</code>) 将匹配任何字符,包括换行符。",
|
|
670
|
+
token: "s"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
id: "extended",
|
|
674
|
+
desc: "字面空格字符被忽略,字符集除外。",
|
|
675
|
+
token: "x"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
id: "ungreedy",
|
|
679
|
+
tip: "将量词默认设置为非贪婪(懒惰)。",
|
|
680
|
+
desc: "将量词默认设置为非贪婪(懒惰)。跟随 <code>?</code> 的量词将变为贪婪。",
|
|
681
|
+
token: "U"
|
|
682
|
+
}
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
];
|
|
686
|
+
// content that isn't included in the Reference menu item:
|
|
687
|
+
o.misc = {
|
|
688
|
+
kids: [
|
|
689
|
+
{
|
|
690
|
+
id: "ignorews",
|
|
691
|
+
label: "ignored whitespace",
|
|
692
|
+
tip: "由于扩展标志或模式,空格字符被忽略。"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
id: "extnumref", // alternative syntaxes.
|
|
696
|
+
proxy: "numref"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
id: "char",
|
|
700
|
+
label: "character",
|
|
701
|
+
tip: "匹配一个 {{getChar()}} 字符 (字符代码 {{code}})。 {{getInsensitive()}}"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
id: "escchar",
|
|
705
|
+
label: "escaped character",
|
|
706
|
+
tip: "匹配一个 {{getChar()}} 字符 (字符代码 {{code}})。"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
id: "open",
|
|
710
|
+
tip: "表示正则表达式的开始。"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
id: "close",
|
|
714
|
+
tip: "表示正则表达式的结束和表达式标志的开始。"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
id: "condition",
|
|
718
|
+
tip: "用于解析封闭条件语句的前瞻匹配。有关信息,请参阅参考中的 'conditional'。"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
id: "conditionalelse",
|
|
722
|
+
label: "conditional else",
|
|
723
|
+
tip: "分隔条件的 'else' 部分。"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
id: "ERROR",
|
|
727
|
+
tip: "表达式中的错误以红色下划线标记。悬停以获取更多信息。"
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
id: "PREG_INTERNAL_ERROR",
|
|
731
|
+
tip: "内部 PCRE 错误"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
id: "PREG_BACKTRACK_LIMIT_ERROR",
|
|
735
|
+
tip: "回溯限制已耗尽。"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
id: "PREG_RECURSION_LIMIT_ERROR",
|
|
739
|
+
tip: "递归限制已耗尽。"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
id: "PREG_BAD_UTF8_ERROR",
|
|
743
|
+
tip: "Malformed UTF-8 data"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
id: "PREG_BAD_UTF8_OFFSET_ERROR",
|
|
747
|
+
tip: "Malformed UTF-8 data"
|
|
748
|
+
}
|
|
749
|
+
]
|
|
750
|
+
};
|
|
751
|
+
o.errors = {
|
|
752
|
+
groupopen: "未匹配的左括号。",
|
|
753
|
+
groupclose: "未匹配的右括号。",
|
|
754
|
+
setopen: "未匹配的左方括号。",
|
|
755
|
+
rangerev: "范围值反转。起始字符代码大于结束字符代码。",
|
|
756
|
+
quanttarg: "量词的目标无效。",
|
|
757
|
+
quantrev: "量词的最小值大于最大值。",
|
|
758
|
+
esccharopen: "悬空的反斜杠。",
|
|
759
|
+
esccharbad: "未识别或格式错误的转义字符。",
|
|
760
|
+
unicodebad: "未识别的 Unicode 类别或脚本。",
|
|
761
|
+
posixcharclassbad: "未识别的 POSIX 字符类。",
|
|
762
|
+
posixcharclassnoset: "POSIX 字符类必须在字符集中。",
|
|
763
|
+
notsupported: "\"{{~getLabel()}}\" 功能在此 RegEx 版本中不受支持。",
|
|
764
|
+
fwdslash: "未转义的斜杠。如果将此表达式复制/粘贴到代码中,可能会导致问题。",
|
|
765
|
+
esccharbad: "无效的转义序列。",
|
|
766
|
+
servercomm: "与服务器通信时发生错误。",
|
|
767
|
+
extraelse: "条件组中多余的 else。",
|
|
768
|
+
unmatchedref: "对不存在的组 \"{{name}}\" 的引用。",
|
|
769
|
+
modebad: "未识别的模式标志 \"<code>{{errmode}}</code>\"。",
|
|
770
|
+
badname: "组名不能以数字开头。",
|
|
771
|
+
dupname: "重复的组名。",
|
|
772
|
+
branchreseterr: "<b>分支重置。</b> 结果将是正确的,但 RegExr 的解析器未正确编号分支重置组。敬请期待!",
|
|
773
|
+
timeout: "该表达式的执行时间超过 250 毫秒。", // TODO: can we couple this to the help content somehow?
|
|
774
|
+
// warnings:
|
|
775
|
+
jsfuture: "\"{{~getLabel()}}\" 功能可能不受所有浏览器支持。",
|
|
776
|
+
infinite: "该表达式可能会返回空匹配,并且在某些用例中可能会无限匹配。", // TODO: can we couple this to the help content somehow?
|
|
777
|
+
};
|
|
778
|
+
/*
|
|
779
|
+
classes:
|
|
780
|
+
quant
|
|
781
|
+
set
|
|
782
|
+
special
|
|
783
|
+
ref
|
|
784
|
+
esc
|
|
785
|
+
anchor
|
|
786
|
+
charclass
|
|
787
|
+
group
|
|
788
|
+
comment
|
|
789
|
+
*/
|
|
790
|
+
//# sourceMappingURL=reference_content.js.map
|