Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
350 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | module.exports = ({onlyFirst = false} = {}) => {
|
---|
| 4 | const pattern = [
|
---|
| 5 | '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
---|
| 6 | '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
---|
| 7 | ].join('|');
|
---|
| 8 |
|
---|
| 9 | return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
---|
| 10 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.