forked from gskinner/regexr
-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
473 lines (438 loc) · 37.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>RegExr: 学习、构建 和 测试 正则表达式 Test RegEx</title>
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3579542-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-3579542-6');
</script>
<!-- source for this is in ./assets/workers/RegExWorker.js -->
<script id="regexWorker" type="javascript/worker">
onmessage=function(e){postMessage("onload");var t,s,n,a=e.data,i=a.text,d=a.tests,l=a.mode,r=new RegExp(a.pattern,a.flags),o=[];if("tests"===l)for(var g=0,x=d.length;g<x;g++){let e=d[g];i=e.text,r.lastIndex=0,t=r.exec(i),o[g]=t?{i:t.index,l:t[0].length,id:e.id}:{id:e.id}}else for(;t=r.exec(i);){s===r.lastIndex&&(n={id:"infinite",warning:!0},++r.lastIndex),s=r.lastIndex;var f=t.reduce(function(e,t,s){return(0===s||e.push({s:t}))&&e},[]);if(o.push({i:t.index,l:t[0].length,groups:f}),!r.global)break}postMessage({error:n,matches:o,mode:l})};
</script>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&family=Source+Code+Pro:wght@200;400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<%= css_file %>">
<!-- basic meta tags -->
<meta name="title" content="RegExr: 学习、构建 和 测试 正则表达式" />
<meta name="description" content="带有语法高亮的、支持PHP / PCRE 和 JS 语言、 上下文解释、 备忘单、参考 和 正则表达式社区的正则表达式测试工具" />
<!-- mobile -->
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
<!-- icons -->
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png?1">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/icons/favicon-32x32.png?1">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/icons/favicon-16x16.png?1">
<link rel="manifest" href="/assets/icons/site.webmanifest?1">
<link rel="mask-icon" href="/assets/icons/safari-pinned-tab.svg?1" color="#70b0e0">
<link rel="shortcut icon" href="/assets/icons/favicon.ico?1">
<meta name="apple-mobile-web-app-title" content="RegExr">
<meta name="application-name" content="RegExr">
<meta name="msapplication-TileColor" content="#70b0e0">
<meta name="msapplication-config" content="/assets/icons/browserconfig.xml">
<meta name="theme-color" content="#70b0e0">
<!-- social -->
<meta property="og:image" content="http://regexr.skys215.com/assets/card.png"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta property="og:title" content="RegExr: 学习、构建 和 测试 正则表达式"/>
<meta property="og:description" content="RegExr 是一个集 学习、构建 和 测试 正则表达式 (Regular Expressions / RegEx / RegExp)于一身的在线工具。"/>
<meta property="og:url" content="http://regexr.skys215.com/"/>
<meta property="og:site_name" content="RegExr"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site:id" content="@gskinner"/>
<meta name="twitter:title" content="RegExr: 学习、构建 和 测试 正则表达式"/>
<meta name="twitter:description" content="RegExr 是一个集 学习、构建 和 测试 正则表达式 (Regular Expressions / RegEx / RegExp)于一身的在线工具。"/>
<meta name="twitter:image" content="http://regexr.skys215.com/assets/card.png"/>
<meta name="twitter:url" content="http://regexr.skys215.com/" />
</head>
<body>
<div style="display:none;">
<!-- inject:svg --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="RegExr" viewBox="0 0 64 64"><path d="M0 0v64h64V0H0zm23.799 52.045H11.783V40.029h12.016v12.016zm29.957-22.401l-5.396 5.235-6.765-11.033L34.67 35.12l-5.396-5.235 9.744-7.328-13.046-4.188 3.785-6.604 10.711 8.617L37.65 7.739h7.57l-2.899 12.643 10.791-8.617 3.785 6.604-12.804 4.027 9.663 7.248z"/></symbol><symbol id="add" viewBox="0 0 332.07 332.08"><path d="M332.07 124.49H207.59V0h-83.11v124.49H0v83.1h124.48v124.49h83.11V207.59h124.48v-83.1z"/></symbol><symbol id="alert" viewBox="0 0 584.053 503.947"><path d="M306.207 358.43h-30.758L258.317 216.54v-77.127h64.611v77.127zm15.277 84.222h-61.72v-59.657h61.72zM292.027.002L0 503.946h584.048z"/></symbol><symbol id="arrowleft" viewBox="0 0 14.2 21"><path d="M10.5 21l3.7-3.7-6.8-6.8 6.8-6.8L10.5 0 0 10.5z"/></symbol><symbol id="arrowright" viewBox="0 0 14.2 21"><path d="M14.2 10.5L3.7 0 0 3.7l6.8 6.8L0 17.3 3.7 21z"/></symbol><symbol id="cheatsheet" viewBox="0 0 397.427 562.667"><path d="M199.147 98.423c11.338 0 20.53-9.196 20.53-20.534V20.528C219.677 9.191 210.485 0 199.147 0c-11.338 0-20.528 9.19-20.528 20.528v57.361c0 11.338 9.19 20.534 20.528 20.534zm-125.806 0c11.336 0 20.529-9.196 20.529-20.534V20.528C93.87 9.191 84.677 0 73.34 0 62.003 0 52.81 9.19 52.81 20.528v57.361c0 11.338 9.192 20.534 20.53 20.534zm251.615 0c11.336 0 20.53-9.196 20.53-20.534V20.528C345.485 9.191 336.291 0 324.955 0c-11.341 0-20.532 9.19-20.532 20.528v57.361c0 11.338 9.19 20.534 20.532 20.534zm10.015 222.738H70.115v41.034H334.97zm0-138.088H70.115v41.036H334.97zm0 69.048H70.115v41.032H334.97zm29.072 277.16H175.227c-49.602 0-25.702-117.574-25.702-117.574S34.86 439.576 33.385 386.995V147.048h330.658zM360.04 22.907V52.79c3.877 6.285 6.157 13.669 6.157 21.596 0 22.784-18.469 41.246-41.246 41.246-22.779 0-41.236-18.462-41.236-41.246 0-7.927 2.273-15.306 6.15-21.59v-29.89h-55.633V52.79c3.88 6.285 6.159 13.669 6.159 21.596 0 22.784-18.468 41.246-41.246 41.246-22.78 0-41.238-18.462-41.238-41.246 0-7.927 2.276-15.306 6.149-21.59v-29.89h-55.632V52.79c3.879 6.285 6.16 13.669 6.16 21.596 0 22.784-18.47 41.246-41.245 41.246-22.781 0-41.242-18.462-41.242-41.246 0-7.927 2.278-15.306 6.152-21.59v-29.89H0v408.212l9.778 9.777 121.768 121.77h265.882V22.907H360.04" fill-rule="evenodd"/></symbol><symbol id="check" viewBox="0 0 17.4 13.8"><path d="M6.2 13.8c-.1 0-.1 0-.2-.1L0 7.8v-.4l2.3-2.2c.1-.1.2-.2.3-.2.1 0 .1 0 .1.1L5.6 8c.1.1.3.2.5.2s.4-.1.5-.2L14.5.1c.1-.1.1-.1.2-.1s.1 0 .2.1l2.5 2.3c.1.1.1.2 0 .3l-11 11c-.1.1-.2.1-.2.1z"/></symbol><symbol id="close" viewBox="0 0 18 18"><path d="M12.2 9l5.6-5.6c.2-.2.2-.6 0-.8L15.4.2c-.2-.2-.6-.2-.8 0L9 5.8 3.4.2c-.2-.2-.6-.2-.8 0L.2 2.5c-.2.2-.2.6 0 .8L5.8 9 .2 14.6c-.2.2-.2.6 0 .8l2.4 2.4c.2.2.6.2.8 0L9 12.2l5.6 5.6c.2.2.6.2.8 0l2.4-2.4c.2-.2.2-.6 0-.8L12.2 9z"/></symbol><symbol id="code" viewBox="0 0 576.68 366"><g><path d="M0 182.996L183.007 0l62.376 62.385-120.61 120.611 120.61 120.614L183.007 366 0 182.996M331.29 303.61l120.622-120.614-96.039-96.035L331.3 62.385 393.683-.004l24.581 24.584 158.417 158.416L393.683 366l-62.394-62.39"/></g></symbol><symbol id="community" viewBox="0 0 586.493 399.72"><g><path d="M585.785 325.27c-4.946-14.343-21.337-16.405-35.026-22.177-15.032-6.338-31.7-13.701-46.7-19.85a24159.56 24159.56 0 00-12.84-3.503c-5.112-3.516-10.11-15.203-12.848-21.013-2.72-.39-5.446-.779-8.172-1.167.421-8.992 5.985-9.476 8.172-16.344 1.926-6.064.202-13.933 3.257-19.539 2.116-3.896 6.91-3.924 9.305-7.26 2.174-3.03 3.606-8.32 4.282-12.028 1.234-6.781 2.31-16.062-.912-22.79-1.848-3.866-3.019-4.236-3.532-8.923-.628-5.688 1.673-24.232 1.77-28.245.235-10.406-.018-19.818-2.534-29.951 0 0-3.062-9.183-7.85-11.95l-9.554-1.64-5.906-5.474c-23.79-14.636-49.298-4.368-62.952 1.16-7.6 2.467-14.098 8.167-18.741 16.557-.15 2.782-.203 5.058-.08 6.224.065.61.132.968.165 1.144.16.304.347.603.536.927.696 1.19 1.652 2.817 2.723 5.065 6.697 13.99 4.717 30.763 2.643 42.172-1.027 5.627-3.542 16.183-8.862 23.608a26.367 26.367 0 01-4.472 4.803c.844 8.892 2.659 19.124 7.998 22.468.736.46 6.36 1.872 6.329 1.488.776 8.17 1.555 16.344 2.332 24.513 1.977 5.435 6.732 6.028 8.11 13.696l-6.08 1.486c-.477 1.013-1.025 2.213-1.631 3.51 12.47 5.14 25.756 10.838 38.629 16.378 8.716 3.748 17.356 7.462 25.64 10.953 3.765 1.595 7.833 3.001 12.137 4.49 17.043 5.898 38.251 13.245 46.294 36.567l.914 2.647v2.795c0 5.18.202 13.528.415 22.37.093 4.024.196 8.197.285 12.367h67.422c.254-12.765-.666-35.79-.666-45.533zM191.82 139.394c-.659-7.236 2.343-12.716 4.135-15.997.344-.636.798-1.463 1.021-1.963a209.73 209.73 0 01-3.32-20.953l-9.279-1.59-5.902-5.474c-23.791-14.636-49.298-4.368-62.952 1.16-19.687 6.396-32.133 34.237-23.44 75.413 1.477 7.032-3.856 10.178-3.504 14.016.762 8.39.918 28.568 8.853 33.539.734.46 6.36 1.872 6.328 1.488l2.33 24.513c1.98 5.435 6.735 6.028 8.108 13.696l-6.079 1.486c-2.73 5.81-7.732 17.497-12.84 21.013-4.28 1.165-8.566 2.335-12.842 3.503-14.999 6.149-31.668 13.512-46.705 19.85C22.047 308.865 5.66 310.927.71 325.271c0 9.742-.92 32.768-.664 45.533H67.78c.087-4.17.183-8.343.284-12.368.21-8.841.411-17.19.411-22.37v-2.794l.914-2.647c8.047-23.322 29.253-30.669 46.293-36.566 4.304-1.49 8.371-2.896 12.14-4.491 8.27-3.483 16.897-7.195 25.594-10.934 12.803-5.505 26.003-11.17 38.411-16.285a643.13 643.13 0 00-1.68-3.622c-2.724-.39-5.444-.779-8.175-1.167.422-8.992 5.99-9.476 8.175-16.344 1.927-6.064.2-13.933 3.256-19.539 2.117-3.896 6.91-3.924 9.304-7.26 2.17-3.03 3.605-8.32 4.28-12.028a82.05 82.05 0 00.93-6.502c-12.998-11.98-14.622-35.258-15.703-51.16-.138-2.006-.26-3.812-.395-5.334"/><path d="M367.261 37.304c3.532 14.219 3.884 27.423 3.559 42.02-.132 5.63-3.363 31.648-2.487 39.623.722 6.58 2.366 7.104 4.959 12.525 4.52 9.44 3.007 22.456 1.275 31.972-.95 5.208-2.955 12.623-6.003 16.87-3.361 4.69-10.081 4.722-13.057 10.189-4.284 7.865-1.864 18.913-4.564 27.412-3.07 9.641-10.882 10.316-11.472 22.926 3.833.551 7.65 1.094 11.472 1.642 3.833 8.149 10.85 24.541 18.018 29.476 6.006 1.642 12.011 3.28 18.019 4.914 21.041 8.632 44.427 18.96 65.519 27.852 19.204 8.1 42.192 10.987 49.136 31.118 0 13.67 1.29 45.96.934 63.877H84.232c-.349-17.916.937-50.207.937-63.877 6.945-20.13 29.935-23.019 49.138-31.118 21.09-8.891 44.476-19.22 65.516-27.852 6.008-1.634 12.013-3.272 18.017-4.914 7.172-4.935 14.192-21.327 18.025-29.476l8.527-2.076c-1.935-10.763-8.601-11.596-11.381-19.22-1.087-11.462-2.18-22.935-3.27-34.403.047.545-7.842-1.43-8.876-2.076-11.126-6.979-11.353-35.281-12.422-47.052-.49-5.384 6.992-9.799 4.913-19.66-12.19-57.773 5.272-96.833 32.887-105.799 19.161-7.768 54.942-22.173 88.318-1.637l8.288 7.68 13.4 2.305c6.72 3.879 11.012 16.759 11.012 16.759"/></g></symbol><symbol id="copy" viewBox="0 0 24 24"><path d="M8 12.5V9l4 4H8.5c-.3 0-.5-.2-.5-.5zM7.5 14H12v9.5c0 .3-.2.5-.5.5H.5c-.3 0-.5-.2-.5-.5v-14c0-.3.2-.5.5-.5H7v4.5c0 .3.2.5.5.5zM14 5h6c.6 0 1-.4 1-1V3c0-.6-.5-1-1-1h-1v-.9c0-.6-.5-1.1-1-1.1h-2c-.5 0-1 .5-1 1.1V2h-1c-.5 0-1 .5-1 1v1c0 .6.5 1 1 1zm.8 11.2H13V19h1.8v-2.8zM23.5 3H22v2c0 .6-.5 1-1 1h-8c-.5 0-1-.4-1-1V3h-1.5c-.3 0-.5.2-.5.5V9l2.8 2.8h2V8l6 6-5 5h7.7c.3 0 .5-.2.5-.4V3.5c0-.3-.2-.5-.5-.5zm-4.9 11L16 11.4V13h-3v2h3v1.6l2.6-2.6z"/></symbol><symbol id="delete" viewBox="0 0 509.12 586.4"><path d="M330.056 72.69H179.06V60.2c.013-10.572 8.588-19.14 19.164-19.167h112.67c10.57.027 19.138 8.595 19.162 19.167zm150.703 0h-109.67V60.2C371.075 26.943 344.144.01 310.893.007H198.224c-33.26.002-60.192 26.936-60.208 60.193v12.49H28.365C12.703 72.69 0 85.39 0 101.054v68.451h509.121v-68.45c0-15.663-12.701-28.363-28.362-28.363zM79.133 586.4h350.856l33.647-383.51H45.486L79.134 586.4"/></symbol><symbol id="distractor" viewBox="0 0 23.9 23.9"><path d="M16.5 19.9l.9-.6 2.1 2.1c-.6.5-1.2.9-1.9 1.2l-1.1-2.7zm-9.9 2.9L7.8 20c-.6-.3-1.1-.7-1.6-1.1L4 21c.8.7 1.7 1.3 2.6 1.8zm14.7-3.2c.4-.5.8-1 1.1-1.6l-2.8-1.2c-.1.2-.3.4-.4.6l2.1 2.2zM13 24c.9-.1 1.7-.2 2.5-.5l-1.2-2.8c-.4.2-.8.3-1.3.3v3zm-4.8-.6c.9.3 1.8.5 2.8.6v-3c-.6-.1-1.1-.2-1.6-.3l-1.2 2.7zM18.5 2C16.5.7 14.3.1 12 0h-.5C5 .1-.1 5.5 0 12c0 2.9 1 5.8 3 8l2.2-2.1C3.8 16.3 3 14.2 3 12.1c0-5 4-9 9-9 1.7 0 3.4.5 4.8 1.4m6.7 11.1l.3-1.5h-3s-.1.1-.1.3l2.8 1.2z"/></symbol><symbol id="dropdown" viewBox="0 0 5 5"><path d="M0 0h5L2.5 5z"/></symbol><symbol id="facebook" viewBox="0 0 24 24"><path d="M24 2.5v19c0 1.4-1.1 2.5-2.5 2.5H16v-9h3l.8-4H16l.1-2c0-1 .3-1.6 1.6-1.6h2.1l.5-3.6s-2.3-.3-3.6-.3c-3 0-4.7 2-4.7 5.1V11H9v4h3v9H2.5C1.1 24 0 22.9 0 21.5v-19C0 1.1 1.1 0 2.5 0h19C22.9 0 24 1.1 24 2.5z"/></symbol><symbol id="favorites" viewBox="0 0 582.013 501.747"><path d="M496.268 14.292C421.636-20.88 332.587 11.12 297.425 85.779c-2.441 5.18-4.561 11.689-6.417 19.237-1.855-7.548-3.979-14.057-6.42-19.237C249.424 11.12 160.398-20.88 85.742 14.292 11.13 49.453-20.883 138.455 14.28 213.109c35.158 74.652 276.67 288.638 276.67 288.638l.055-.686.058.686S532.576 287.76 567.732 213.109c35.164-74.654 3.196-163.656-71.464-198.817" fill-rule="evenodd"/></symbol><symbol id="flags" viewBox="0 0 581.48 586.653"><path d="M457.855 46.08s-83.258 113.95-206.438-9.227v.226C163.571-53.06 87.276 49.48 87.276 49.48l123.627 296.931s51.352-145.863 206.436 9.224v-.228c87.844 90.13 164.144-12.407 164.144-12.407zM0 82.587l208.485 504.066 58.624-24.245L58.615 58.328 0 82.587"/></symbol><symbol id="github" viewBox="0 0 24 24"><path d="M21.5 0h-19C1.1 0 0 1.1 0 2.5v19C0 22.9 1.1 24 2.5 24h19c1.4 0 2.5-1.1 2.5-2.5v-19C24 1.1 22.9 0 21.5 0zM10 16H8v-3h2v3zm3 1h-2v-1h2v1zm3-1h-2v-3h2v3zm-1-9l4-2 .1 4c.7.9.9 1.8.9 3v1c0 1.8-1 3.4-2.5 4.3.3-.3.5-.8.5-1.3v-2c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v2c0 .5.2 1 .5 1.3C5 16.4 4 14.8 4 13v-1c0-1.1.4-2.2 1-3V5l4 2h6z"/></symbol><symbol id="google" viewBox="0 0 24 24"><path d="M21.5 0h-19C1.1 0 0 1.1 0 2.5v19C0 22.9 1.1 24 2.5 24h19c1.4 0 2.5-1.1 2.5-2.5v-19C24 1.1 22.9 0 21.5 0zm-9.4 19.2c-4 0-7.2-3.2-7.2-7.2s3.2-7.2 7.2-7.2c1.8 0 3.5.7 4.8 1.9l.2.1L14.9 9l-.1-.1c-.5-.5-1.3-1-2.7-1C9.8 7.8 8 9.7 8 12s1.8 4 4.1 4c2.5 0 3.5-1.9 3.7-2.8h-4v-2.4h6.9c.1 0 .3 0 .3 1.4 0 4.1-2.8 7-6.9 7z"/></symbol><symbol id="help" viewBox="0 0 24.5 24.5"><path d="M14.3 19.8c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM12.2 0C5.5 0 0 5.5 0 12.2s5.5 12.2 12.2 12.2S24.5 19 24.5 12.2 19 0 12.2 0zm2.9 12.1c-1 .6-1.3 1.2-1.3 2.4 0 .1-.1.2-.2.2H11c-.1 0-.2-.2-.2-.2v-1c0-1.1.6-2 1.8-2.9.1-.1 1-.6 1-1.4-.1-.7-.6-1.2-1.3-1.2-1 0-1.6.5-1.6 1.5 0 .1-.1.2-.2.2H7.7c-.1 0-.1 0-.2-.1 0 0-.1-.1-.1-.2.1-2.7 1.9-4.3 4.8-4.3 2.2 0 4.6 1.2 4.6 3.9.1 1.9-.3 2.2-1.7 3.1z"/></symbol><symbol id="info" viewBox="0 0 270.76 535.8"><path d="M147.241 65.433c0-35.989 31.078-65.43 67.076-65.43 32.742 0 56.448 22.072 56.448 55.621 0 37.644-31.07 65.459-67.885 65.459-33.533 0-55.639-22.102-55.639-55.65zm-44.166 161.148c5.723-14.713-1.643-22.072-8.19-22.072-30.25 0-69.54 71.166-84.231 71.166C4.906 275.675 0 269.932 0 265.028c0-14.724 35.988-49.073 46.643-59.71 32.704-31.082 75.254-54.806 122.704-54.806 35.157 0 72.8 21.26 43.352 100.628l-58.91 159.492c-4.886 12.273-13.886 32.741-13.886 45.823 0 5.72 3.25 11.46 9.796 11.46 24.529 0 69.541-69.546 80.997-69.546 4.081 0 9.801 4.9 9.801 12.263 0 23.724-95.694 125.168-178.325 125.168-29.45 0-49.898-13.895-49.898-44.985 0-39.255 27.807-106.342 33.56-120.259l57.24-143.975" fill-rule="evenodd"/></symbol><symbol id="link" viewBox="0 0 533.867 565.667"><g><path d="M288.607 391.817c-36.422.042-72.928-14.228-100.431-41.757l-4.355-4.355 62.379-62.398 4.361 4.356c10.739 10.714 24.312 15.886 38.046 15.922 14.386-.057 28.116-5.238 38.83-15.922l102.268-102.268c10.699-10.734 15.879-24.408 15.927-38.527-.048-13.993-5.22-27.63-15.913-38.359l-4.358-4.354c-10.732-10.7-24.377-15.871-38.436-15.924-14.066.053-27.713 5.224-38.446 15.924l-42.05 42.057c-17.221 17.23-45.156 17.23-62.384 0-17.232-17.225-17.232-45.156-.006-62.384l42.056-42.059C313.82 14.007 350.576-.045 386.925 0c36.342-.045 73.094 14.007 100.824 41.77l4.355 4.35c27.71 27.683 41.81 64.388 41.759 100.748.05 36.333-13.966 73.13-41.767 100.912L389.824 350.047c-27.887 27.922-64.784 41.77-100.99 41.77h-.227"/><path d="M146.55 565.667c-36.41.036-72.925-14.227-100.43-41.765l-4.352-4.347C13.934 491.75-.05 454.916 0 418.588c-.044-36.359 14.075-73.043 41.768-100.69L144.04 215.624c27.725-27.762 64.481-41.822 100.83-41.77 28.495-.041 57.24 8.592 81.689 25.698a44.063 44.063 0 0111.226 8.157l7.908 7.907 4.355 4.35h-.001l.001.004-62.376 62.398-.005-.007-4.355-4.356c-10.736-10.699-24.38-15.87-38.443-15.923-14.06.054-27.706 5.224-38.441 15.923L104.146 380.288c-10.695 10.73-15.867 24.348-15.912 38.3.05 14.17 5.23 27.848 15.917 38.576l4.357 4.346c10.74 10.718 24.314 15.885 38.043 15.922 14.392-.057 28.122-5.237 38.838-15.922l44.068-44.067c17.231-17.22 45.163-17.22 62.384.008 17.228 17.222 17.228 45.15 0 62.382l-44.069 44.069c-27.885 27.915-64.79 41.765-100.995 41.765h-.226"/></g></symbol><symbol id="load" viewBox="0 0 537 488.6"><path d="M0 329.22h241.005V488.6l295.996-244.299L241.005.003v159.384H0V329.22"/></symbol><symbol id="menu" viewBox="0 0 542.187 461.8"><g><path d="M184.508 112.461V1.656h357.677v110.805H184.508M184.508 287.127V176.329h357.679v110.798H184.508M184.508 461.8V351h357.681v110.8H184.508M116.022 58.001c0 32.044-25.974 58.011-58.012 58.011C25.973 116.012 0 90.045 0 58.002 0 25.961 25.973-.005 58.01-.005c32.038 0 58.012 25.967 58.012 58.005M116.022 224.827c0 32.037-25.974 58.01-58.012 58.01-32.037 0-58.01-25.973-58.01-58.01 0-32.036 25.973-58.011 58.01-58.011 32.038 0 58.012 25.975 58.012 58.01M116.022 403.357c0 32.038-25.974 58.011-58.012 58.011-32.037 0-58.01-25.973-58.01-58.01 0-32.04 25.973-58.01 58.01-58.01 32.038 0 58.012 25.97 58.012 58.01"/></g></symbol><symbol id="moon" viewBox="0 0 20.9 23.7"><path d="M20.7 19.9c-2.1 2.3-5 3.7-8.4 3.9-6.6.1-12.1-5-12.3-11.6C-.2 5.7 5 .2 11.5 0h1.2c.4 0 .5.2.2.4-3 1.9-5 5.3-4.8 9.1.2 5.8 5 10.3 10.8 10.1.5 0 1-.1 1.5-.2.5 0 .6.1.3.5z"/></symbol><symbol id="private" viewBox="0 0 574.187 311.053"><path d="M287.083 263.93c-60.782 0-110.062-49.234-110.062-110.094 0-60.783 49.28-110.047 110.062-110.047 60.816 0 110.094 49.264 110.094 110.047 0 60.86-49.278 110.093-110.094 110.093zm0-263.937C144.045-.007 0 155.524 0 155.524s144.045 155.53 287.083 155.53c143.058 0 287.105-155.53 287.105-155.53S430.141-.006 287.083-.006zm0 99.923c-29.74 0-53.934 24.19-53.934 53.92 0 29.755 24.194 53.964 53.934 53.964 29.758 0 53.965-24.21 53.965-53.964 0-29.73-24.207-53.92-53.965-53.92"/></symbol><symbol id="reference" viewBox="0 0 474.32 579.587"><path d="M437.895 478.072l-30.206 1.404V104.79L72.372 78.705h-.765c-11.634.048-21.912-3.129-28.036-7.066-3.07-1.923-5.058-3.971-6.035-5.454-.985-1.532-1.093-2.282-1.117-3.002.024-.719.132-1.466 1.117-2.999 1.423-2.235 5.303-5.675 11.365-8.228 6.02-2.58 13.982-4.303 22.706-4.295h.168l366.12-10.214zM332.619 244.7L91.36 225.373l3.271-40.904 241.26 19.322zm-61.968 97.784l-139.237-10.823 3.178-40.912 139.237 10.83zM71.32 11.244c-17.75.096-34.054 4.461-47.192 12.69-6.588 4.174-12.434 9.4-16.85 15.989C2.858 46.464-.021 54.592 0 63.183v438.27c-.02 8.596 2.858 16.727 7.279 23.264 6.674 9.866 16.346 16.727 27.318 21.454 10.801 4.594 23.083 7.108 36.163 7.218l336.93 26.198v-63.65l66.633-3.102V.005L71.32 11.244"/></symbol><symbol id="search" viewBox="0 0 594.573 594.107"><path d="M234.513 411.179c-96.785-.622-175.027-79.878-174.416-176.67.62-96.172 79.352-174.416 175.5-174.421l1.174.003c46.889.294 90.857 18.832 123.8 52.198 32.94 33.367 50.918 77.57 50.616 124.468-.296 46.687-18.703 90.524-51.823 123.42-33.112 32.894-77.04 51.003-123.69 51.003zm351.942 89.513l-3.588-3.585.008-.003-143.352-143.363c19.917-34.312 31.488-74.086 31.76-116.601C472.117 106.987 367.296.816 237.152-.003c-.525-.002-1.035-.002-1.557-.002C106.18 0 .838 104.516.005 234.125-.82 364.271 104.003 470.44 234.133 471.271c.519.002 1.022.005 1.54.005 43.258 0 83.795-11.72 118.664-32.1l143.226 143.241.013-.012 3.581 3.58c10.834 10.832 28.391 10.823 39.219 0l46.079-46.072c10.822-10.822 10.829-28.39 0-39.22"/></symbol><symbol id="share" viewBox="0 0 572.987 572.987"><path d="M286.499 377.804c-50.427 0-91.304-40.877-91.304-91.305 0-50.426 40.877-91.308 91.304-91.308 50.424 0 91.3 40.882 91.3 91.308 0 50.428-40.876 91.305-91.3 91.305zm286.486-60.085V252.52l-9.208-3.008-69.8-22.788-18.626-44.97 35.801-75.752-46.115-46.107-8.634 4.384-65.467 33.25L345.975 78.9 317.71.007h-65.199l-3.004 9.216-22.788 69.802-44.95 18.623-75.778-35.799-46.097 46.107 4.382 8.632 33.244 65.488-18.612 44.941L0 255.27v65.211l9.218 3.004 69.802 22.792 18.622 44.957-35.793 75.76 46.09 46.117 8.646-4.393 65.47-33.24 44.958 18.623 28.251 78.887h65.204l3.012-9.21 22.792-69.8 44.961-18.622 75.758 35.806 46.112-46.12-4.382-8.64-33.249-65.458 18.625-44.967 78.888-28.257"/></symbol><symbol id="thumb" viewBox="0 0 393.4 552.9"><path d="M393.413 336.92c0-24.573-4.573-44.48-29.146-44.48H344.04c18.507-4.707 22.267-24.08 22.267-47.32 0-26.76-4.974-48.453-31.72-48.453h-75.734c-50.773-2.467 13-18.934 13-120.24 0-86.014-91.506-76.08-91.506-76.08v53.386c-13.96 70.774-79.454 121.694-111.987 143.08C26.587 213.093 0 251.213 0 299.267V430.2c0 67.773 54.933 122.693 122.693 122.693h205.734c24.12 0 28.613-19.56 28.613-43.68 0-20.666-3.347-37.92-19.413-42.466H358c23.72 0 28.133-19.227 28.133-42.934 0-21.52-3.68-39.28-22.053-42.4h.187c24.573 0 29.146-19.933 29.146-44.493"/></symbol><symbol id="user" viewBox="0 0 580.8 538.093"><path d="M392.913 51.767c4.902 19.732 5.392 21.374 4.936 41.633-.184 7.807-4.666 43.915-3.448 54.99 1.002 9.135 3.28 9.86 6.883 17.387 6.273 13.099 4.173 31.168 1.767 44.376-1.318 7.228-4.102 17.515-8.331 23.415-4.663 6.501-13.997 6.55-18.123 14.136-5.945 10.927-2.588 26.256-6.336 38.053-4.257 13.378-15.1 14.318-15.917 31.823 5.315.75 10.616 1.512 15.917 2.27 5.322 11.314 15.063 34.07 25.012 40.918 8.334 2.273 16.674 4.548 25.003 6.817 29.21 11.976 61.668 26.31 90.939 38.65 26.654 11.245 58.569 15.253 68.202 43.196 0 18.972 1.79 63.797 1.3 88.662H.085c-.49-24.865 1.298-69.69 1.298-88.662 9.634-27.943 41.547-31.951 68.202-43.196 29.27-12.34 61.729-26.674 90.935-38.65 8.333-2.269 16.675-4.544 25.005-6.817 9.947-6.848 19.692-29.604 25.012-40.917l11.836-2.878c-2.688-14.941-11.938-16.104-15.792-26.68-1.512-15.908-3.025-31.826-4.545-47.74.073.75-10.884-1.997-12.317-2.894-15.44-9.676-15.755-48.964-17.242-65.304-.676-7.47 9.712-13.591 6.826-27.287-16.922-80.184 7.314-117.71 45.638-130.153 26.6-10.778 76.264-30.764 122.588-2.271L359.025 25.3l18.603 3.205c9.332 5.388 15.285 23.262 15.285 23.262"/></symbol></svg><!-- endinject -->
</div>
<div class="container">
<header class="header">
<svg class="icon logo inline"><use xlink:href="#RegExr"></use></svg>
<div class="settings">
<span class="name">新建表达式</span>
<svg class="icon share"><use xlink:href="#share"><title>表达式设置</title></use></svg>
</div>
</ul>
<ul class="file">
<li class="save disabled"><span class="action">保存</span> <span class="savekey">(--)</span></li>
<li class="new">新建</li>
</ul>
<ul class="etc">
<li class="button theme"><svg class="icon moon inline"><use xlink:href="#moon"><title>暗黑模式</title></use></svg></li>
<li class="by">由 <a href="http://gskinner.com">gskinner</a>创建</li>
<li class="github"><a href="http://github.com/gskinner/regexr/">GitHub</a></li>
<li class="by">| 由<a href="http://github.com/skys215/regexr/">skys215</a>和<a href="http://github.com/yaoyuan4102/">yaoyuan4102</a>翻译</li>
<li class="github"><a href="http://github.com/skys215/regexr/">中文GitHub</a></li>
<li class="signin"><a>
<svg class="icon user inline"><use xlink:href="#user"></use></svg>
<span class="label">登录</span>
</a></li>
</ul>
</header>
<div class="app">
<aside class="sidebar">
<div class="full">
<header class="row">
<div class="backrow">
<svg class="icon back"><use xlink:href="#menu"></use></svg>
<h1 class="label">菜单</h1>
</div>
<svg class="small icon close"><use xlink:href="#close"><title>最小化菜单</title></use></svg>
</header>
<header class="search row">
<input type="text" placeholder="搜索">
<svg class="icon distractor anim-spin"><use xlink:href="#distractor"></use></svg>
<svg class="icon search"><use xlink:href="#search"></use></svg>
</header>
<ul class="list"></ul>
<div class="content">
RegExr 是一个集 <b>学习</b>、<b>构建</b> 和 <b>测试</b> 正则表达式(Regular Expressions / RegEx / RegExp)于一身的在线工具。
<hr>
<ul>
<li>支持 <b>JavaScript</b> & <b>PHP/PCRE</b> 正则表达式。</li>
<li>匹配结果<b>即时</b>显示。</li>
<li>在匹配结果或表达式上<b>滚动滚轮</b>以见详情。</li>
<li>使用<b>测试</b>验证表达式。</li>
<li><b>保存</b> 并与其他人分享正则表达式。</li>
<li>使用 <b>工具</b> 查看匹配结果。</li>
<li>完整的、带有帮助和示例的<b>正则表达式文档</b>。</li>
<li>在编辑器中按 {{getCtrlKey()}}-Z / Y<b>撤销</b> 和 <b>重做</b> 。</li>
<li>搜索并为<b>社区正则表达式</b>评分。</li>
</ul>
</div>
<div class="hello">
<div class="native-js">
<a href="#native_link#" class="native-flex">
<style>
.native-js {
background: linear-gradient(-30deg, #native_bg_color#E5, #native_bg_color#E5 45%, #native_bg_color# 45%) #fff;
}
.native-details {
color: #native_color# !important;
}
.native-details:hover {
color: #native_color_hover# !important;
}
</style>
<div class="native-main">
<img class="native-img" src="#native_logo#">
<div class="native-details">
<span class="native-company">由 #native_company# 赞助</span>
<span class="native-desc">#native_desc#</span>
</div>
</div>
</a>
</div>
<div class="noad">
<b>Want to support RegExr?</b> Consider disabling your ad-blocker for this domain. We'll show a non-intrusive, dev-oriented ad in this area.
</div>
</div>
</div>
<div class="min">
<ul class="list"></ul>
</div>
</aside>
<div class="doc">
<div class="blocker"></div>
<section class="expression">
<header>
<h1>表达式</h1>
<div class="controlbar">
<div class="button flavor">
<svg class="icon"><use xlink:href="#code"></use></svg>
<span class="label">JavaScript</span>
<svg class="icon dropdown"><use xlink:href="#dropdown"></use></svg>
</div>
<div class="button flags">
<svg class="icon"><use xlink:href="#flags"></use></svg>
<span class="label">标识</span>
<svg class="icon dropdown"><use xlink:href="#dropdown"></use></svg>
</div>
</div>
</header>
<article class="editor"><svg class="icon alert"><use xlink:href="#alert"></use></svg></article>
</section>
<section class="text">
<header>
<h1>
<ul class="segcontrol modelist"></ul>
</h1>
<div class="button add">
<svg class="icon add"><use xlink:href="#add"></use></svg>
<span class="label">添加测试</span>
</div>
<div class="controlbar">
<div class="control result">无结果。</div>
</div>
</header>
<article>
<article class="editor multiline"><div class="pad">
<textarea>
RegExr was created by gskinner.com and is proudly hosted by Media Temple.
Edit the Expression & Text to see matches. Roll over matches or the expression for details. PCRE & JavaScript flavors of RegEx are supported. Validate your expression with Tests mode.
The side bar includes a Cheatsheet, full Reference, and Help. You can also Save & Share with the Community and view patterns you create or favorite in My Patterns.
Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain describes your expression in plain English.
</textarea>
</div></article>
<div class="tests">
<ul class="list"></ul>
<div class="add button">
<svg class="icon add"><use xlink:href="#add"></use></svg>
<span class="label">添加测试</span>
</div>
<div class="default">
创建一套满足(或不满足)你的正则表达式的测试。
<p>通过点击“添加测试”按钮来创建新的测试。点击一个测试来编辑其名字、类型以及文本。</p>
</div>
</div>
</section>
<section class="tools">
<header>
<h1>工具</h1>
<ul class="segcontrol toollist"></ul>
<svg class="small icon max"><use xlink:href="#close"><title>开关工具面板</title></use></svg>
</header>
<article>
<svg class="icon help"><use xlink:href="#help"></use></svg>
<div class="inputtool">
<div class="editor"></div>
<div class="result"></div>
</div>
<div class="content"></div>
</article>
</section>
</div>
</div>
</div>
<div id="library" style="display:none;">
<div id="tooltip" class="tooltip">
<svg class="tip"><use xlink:href="#dropdown"></use></svg>
<div class="content"></div>
</div>
<div id="tooltip-flavor">
<header>
<h1>正则引擎</h1>
<svg class="icon help"><use xlink:href="#help"></use></svg>
</header>
<hr>
<ul class="list"></ul>
</div>
<div id="tooltip-flags">
<header>
<h1>正则标识</h1>
<svg class="icon help"><use xlink:href="#help"></use></svg>
</header>
<hr>
<ul class="list"></ul>
</div>
<div id="tooltip-testtypes">
<ul class="list"></ul>
</div>
<div id="tooltip-signin">
<div class="signin">
<header>
<h1>登录</h1>
<svg class="icon help"><use xlink:href="#help"></use></svg>
</header>
<hr>
<div class="content">
登录以 保存正则表达式 和 使用收藏夹。点击上方的帮助按钮查看更多信息。
<br><br>
任何未保存的改动都会丢失。已保存的正则表达式和收藏会迁移到你的帐号下。
</div>
<hr>
<ul class="list"></ul>
</div>
<div class="signout">
<header>
<h1>退出</h1>
</header>
<hr>
<div class="content">
当前登录用户<b class="username">--</b> 经 <b class="type">--</b>.
<br><br>
<span class="signoutbtn">退出。</span>
</div>
</div>
<div class="distract">
<svg class="icon distractor anim-spin"><use xlink:href="#distractor"></use></svg>
请稍等……
</div>
</div>
<div id="cheatsheet">
<table class="cheatsheet">
<tr><th colspan="2" data-id="charclasses">字符类</th></tr>
<tr><td>.</td><td>匹配除了换行符(\n)以外的任意一个字符</td></tr>
<tr><td>\w \d \s</td><td>任意一个字母或数字或下划线,也就是 A~Z,a~z,0~9,_ 中任意一个, 任意一个数字,0~9 中的任意一个, 包括空格、制表符、换页符等空白字符的其中任意一个</td></tr>
<tr><td>\W \D \S</td><td>非 字母, 数字, 空白字符</td></tr>
<tr><td>[abc]</td><td>匹配a、 b、或c中的任何一个</td></tr>
<tr><td>[^abc]</td><td>匹配 a、b和c之外的任何一个</td></tr>
<tr><td>[a-g]</td><td>a和g之间的任意一个字符</td></tr>
<tr><th colspan="2" data-id="anchors">锚</th></tr>
<tr><td>^abc$</td><td>字符串的开头/结尾</td></tr>
<tr><td>\b \B</td><td>单词边界、非单词的边界</td></tr>
<tr><th colspan="2" data-id="escchars">转义字符</th></tr>
<tr><td>\. \* \\</td><td>转义特殊字符</td></tr>
<tr><td>\t \n \r</td><td>制表符, LF换行符, CR换行符</td></tr>
<!-- <tr><td>\u00A9</td><td>unicode escaped ©</td></tr> -->
<tr><th colspan="2" data-id="groups">分组 & 前瞻后顾</th></tr>
<tr><td>(abc)</td><td>捕获分组</td></tr>
<tr><td>\1</td><td>反向引用#1</td></tr>
<tr><td>(?:abc)</td><td>不捕获分组</td></tr>
<tr><td>(?=abc)</td><td>正向前瞻</td></tr>
<tr><td>(?!abc)</td><td>负向前瞻</td></tr>
<tr><th colspan="2" data-id="quants">量词 & 分支</th></tr>
<tr><td>a* a+ a?</td><td>0个或更多,1个或更多,0个或1个</td></tr>
<tr><td>a{5} a{2,}</td><td>刚好5个,2个或以上</td></tr>
<tr><td>a{1,3}</td><td>1~3个</td></tr>
<tr><td>a+? a{2,}?</td><td>非贪婪匹配(仅可能少匹配)</td></tr>
<tr><td>ab|cd</td><td>匹配 ab 或 cd</td></tr>
</table>
</div>
<div id="community" class="community">
<header>
<div class="label name"></div>
<div>
<svg class="icon favorites"><use xlink:href="#favorites"><title>收藏夹(添加到我的收藏夹)</title></use></svg>
<svg class="icon share"><use xlink:href="#share"><title>加载并打开正则表达式设置</title></use></svg>
</div>
</header>
<div class="actions list">
<div class="link row">
<svg class="icon link"><use xlink:href="#link"></use></svg>
<div class="label">加载</div>
<div class="url">--</div>
<svg class="icon copy"><use xlink:href="#copy"><title>复制到粘贴版</title></use></svg>
</div>
<div class="rate inactive row">
<svg class="icon thumb"><use xlink:href="#thumb"></use></svg>
<div class="label">评分</div>
<svg class="icon rate thumbdown"><use xlink:href="#thumb"><title>给正则表达式评分</title></use></svg>
<span class="rating">--</span>
<svg class="icon rate thumbup"><use xlink:href="#thumb"><title>给正则表达式评分</title></use></svg>
</div>
</div>
<div class="desc"></div>
<div class="author"></div>
<hr>
</div>
<div id="share">
<!-- holds all the elements used in the Save & Share section -->
<div id="share_main">
<div class="signin row">
<svg class="icon user"><use xlink:href="#user"></use></svg>
<div class="label signin"><a>登录</a> 来避免弄丢你的正则表达式!</div>
<div class="label signout">以<b class="username">--</b>登录</div>
</div>
<div class="save row">
<div class="message">保存会创建一个可分享的链接。</div>
<div class="buttons row">
<div class="fork button">Fork</div>
<div class="save button default">保存</div>
<div class="status"></div>
</div>
</div>
<div class="info">
<div class="info row">
<svg class="icon info"><use xlink:href="#info"></use></svg>
<div class="label">选填信息</div>
</div>
<div class="inputs">
<input class="name" type="text" placeholder="表达式名称(建议填上)" maxlength="30">
<input class="author" type="text" placeholder="作者名称" maxlength="20">
<textarea class="description" rows="4" placeholder="描述" maxlength="250"></textarea>
<input class="keywords" type="text" placeholder="关键字" maxlength="50">
</div>
</div>
<div class="actions list">
<div class="link row">
<svg class="icon link"><use xlink:href="#link"></use></svg>
<div class="label">分享链接</div>
<div class="url"></div>
<svg class="icon copy"><use xlink:href="#copy"><title>复制到粘贴版</title></use></svg>
</div>
<div class="private row">
<svg class="icon private"><use xlink:href="#private"></use></svg>
<div class="label">私有</div>
<div class="status"></div>
<svg class="icon check"><use xlink:href="#check"></use></svg>
</div>
<div class="favorites row">
<svg class="icon favorites"><use xlink:href="#favorites"></use></svg>
<div class="label">收藏夹</div>
<div class="status"></div>
<svg class="icon check"><use xlink:href="#check"></use></svg>
</div>
<div class="community row">
<svg class="icon community"><use xlink:href="#community"></use></svg>
<div class="label">分享到社区</div>
<svg class="icon arrow"><use xlink:href="#arrowright"></use></svg>
</div>
<div class="delete row">
<svg class="icon delete"><use xlink:href="#delete"></use></svg>
<div class="label">删除</div>
<div class="status"></div>
</div>
</div>
</div>
<div id="share_community">
编写以下信息使人们容易找到该表达式。
<div class="inputs">
<input class="name" type="text" placeholder="表达式名称(必填)" maxlength="30">
<input class="author" type="text" placeholder="作者名称" maxlength="20">
<textarea class="description" rows="3" placeholder="描述" maxlength="250"></textarea>
<input class="keywords" type="text" placeholder="关键字" maxlength="50">
</div>
<div class="buttons">
<div class="button cancel">取消</div>
<div class="button share default"><svg class="icon community"><use xlink:href="#community"></use></svg> 分享</div>
<div class="status"></div>
</div>
点此会分享该正则表达式(包括文本)的一个副本到社区。
<b>你将无法编辑或删除已分享的副本。</b>
</div>
</div>
<div id="tests_item">
<header>
<svg class="icon fail small"><use xlink:href="#close"><title>Failed</title></use></svg>
<svg class="icon pass small"><use xlink:href="#check"><title>Passed</title></use></svg>
<h1><input type="text" class="name" placeholder="Untitled Test"></input></h1>
<div class="button type">
<span class="label">Match all</span>
<svg class="icon dropdown"><use xlink:href="#dropdown"></use></svg>
</div>
<svg class="icon delete small"><use xlink:href="#delete"><title>Delete test</title></use></svg>
</header>
<article>
<div class="bar"></div>
<div class="editor multiline"><div class="pad"></div></div>
</article>
</div>
</div>
<script src="<%= js_file %>"></script>
<script id="phpinject">
/** INJECTED BY PHP **/
// first param false indicates a local init.
// php passes either a pattern object, or null.
regexr.init(false, {
// local test user:
userId: 111,
authenticated: true,
username: "gskinner",
author: "grantskinner",
type: "temporary"
}, {
"PCREVersion": "8.38 2015-11-23",
"PHPVersion": "7.2.6 Debian stretch"
});
</script>
</body>
</html>