Changes between Initial Version and Version 1 of Ticket #3945, comment 5
- Timestamp:
- 03/30/23 15:37:49 (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3945, comment 5
initial v1 11 11 Local $sSubject, $aPattern = ['\h', '(*UCP)\h', '\s', '(*UCP)\s', '[[:space:]]', '(*UCP)[[:space:]]'] 12 12 ; Character to pattern 13 For $i = 0 To 25513 For $i = 0 To 65535 14 14 $sSubject = ChrW($i) 15 15 For $sPattern In $aPattern 16 16 If StringRegExp($sSubject, $sPattern) Then 17 CW("ChrW(0x" & Hex(AscW($sSubject), 2) & ") matched by pattern " & $sPattern)17 CW("ChrW(0x" & Hex(AscW($sSubject), 4) & ") matched by pattern " & $sPattern) 18 18 EndIf 19 19 Next … … 22 22 ; Pattern to character 23 23 For $sPattern In $aPattern 24 For $i = 0 To 25524 For $i = 0 To 65535 25 25 $sSubject = ChrW($i) 26 26 If StringRegExp($sSubject, $sPattern) Then 27 CW("Pattern " & $sPattern & " matches ChrW(0x" & Hex(AscW($sSubject), 2) & ")")27 CW("Pattern " & $sPattern & " matches ChrW(0x" & Hex(AscW($sSubject), 4) & ")") 28 28 EndIf 29 29 Next … … 32 32 33 33 Here, CW() is just a ConsoleWrite with a @LF appended. 34 35 Note that there are many other Unicode codepoint matching the various "spacing" patterns in UCP mode!