forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregularExpressionCharacterClassRangeOrder.js
More file actions
40 lines (35 loc) · 1.68 KB
/
Copy pathregularExpressionCharacterClassRangeOrder.js
File metadata and controls
40 lines (35 loc) · 1.68 KB
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
//// [tests/cases/compiler/regularExpressionCharacterClassRangeOrder.ts] ////
//// [regularExpressionCharacterClassRangeOrder.ts]
// The characters in the following regular expressions are ASCII-lookalike characters found in Unicode, including:
// - 𝘈 (U+1D608 Mathematical Sans-Serif Italic Capital A)
// - 𝘡 (U+1D621 Mathematical Sans-Serif Italic Capital Z)
//
// See https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
const regexes: RegExp[] = [
/[𝘈-𝘡][𝘡-𝘈]/,
/[𝘈-𝘡][𝘡-𝘈]/u,
/[𝘈-𝘡][𝘡-𝘈]/v,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/u,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/v,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/u,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/v,
];
//// [regularExpressionCharacterClassRangeOrder.js]
// The characters in the following regular expressions are ASCII-lookalike characters found in Unicode, including:
// - 𝘈 (U+1D608 Mathematical Sans-Serif Italic Capital A)
// - 𝘡 (U+1D621 Mathematical Sans-Serif Italic Capital Z)
//
// See https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
const regexes = [
/[𝘈-𝘡][𝘡-𝘈]/,
/[𝘈-𝘡][𝘡-𝘈]/u,
/[𝘈-𝘡][𝘡-𝘈]/v,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/u,
/[\u{1D608}-\u{1D621}][\u{1D621}-\u{1D608}]/v,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/u,
/[\uD835\uDE08-\uD835\uDE21][\uD835\uDE21-\uD835\uDE08]/v,
];