Hex_Digit.js (1325B)
1 // Copyright 2025 Mathias Bynens. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 author: Mathias Bynens 6 description: > 7 Unicode property escapes for `Hex_Digit` 8 info: | 9 Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests 10 Unicode v17.0.0 11 esid: sec-static-semantics-unicodematchproperty-p 12 features: [regexp-unicode-property-escapes] 13 includes: [regExpUtils.js] 14 ---*/ 15 16 const matchSymbols = buildString({ 17 loneCodePoints: [], 18 ranges: [ 19 [0x000030, 0x000039], 20 [0x000041, 0x000046], 21 [0x000061, 0x000066], 22 [0x00FF10, 0x00FF19], 23 [0x00FF21, 0x00FF26], 24 [0x00FF41, 0x00FF46] 25 ] 26 }); 27 testPropertyEscapes( 28 /^\p{Hex_Digit}+$/u, 29 matchSymbols, 30 "\\p{Hex_Digit}" 31 ); 32 testPropertyEscapes( 33 /^\p{Hex}+$/u, 34 matchSymbols, 35 "\\p{Hex}" 36 ); 37 38 const nonMatchSymbols = buildString({ 39 loneCodePoints: [], 40 ranges: [ 41 [0x00DC00, 0x00DFFF], 42 [0x000000, 0x00002F], 43 [0x00003A, 0x000040], 44 [0x000047, 0x000060], 45 [0x000067, 0x00DBFF], 46 [0x00E000, 0x00FF0F], 47 [0x00FF1A, 0x00FF20], 48 [0x00FF27, 0x00FF40], 49 [0x00FF47, 0x10FFFF] 50 ] 51 }); 52 testPropertyEscapes( 53 /^\P{Hex_Digit}+$/u, 54 nonMatchSymbols, 55 "\\P{Hex_Digit}" 56 ); 57 testPropertyEscapes( 58 /^\P{Hex}+$/u, 59 nonMatchSymbols, 60 "\\P{Hex}" 61 ); 62 63 reportCompare(0, 0);