Fix regex parser for hex values

This commit is contained in:
1024jp 2020-05-19 09:05:32 +09:00
parent 8d16aeb6af
commit de83857fd3
2 changed files with 6 additions and 5 deletions

View File

@ -15,7 +15,8 @@ Change Log
### Fixes
- Fix an issue where the application hung up by extending the selection with shortcut `⌥⇧→` when the character to select is a national flag emoji.
- [beta.4] Fix an issue where the font of font character in the character inspector was wrongly applied.
- Fix an issue in the find panel where a regular expression pattern for Unicode code point was not highlighted properly when the hex contains uppercase letters.
- [beta.4] Fix an issue where the font of the object character in the character inspector was wrongly applied.

View File

@ -92,10 +92,10 @@ enum RegularExpressionSyntaxType {
escapeIgnorer + "\\\\" + "c[a-z]", // \cX (control)
escapeIgnorer + "\\\\" + "N\\{[a-zA-Z0-9 ]+\\}", // \N{UNICODE CHARACTER NAME}
escapeIgnorer + "\\\\" + "[pP]\\{[a-zA-Z0-9 ]+\\}", // \p{UNICODE PROPERTY NAME}
escapeIgnorer + "\\\\" + "u[0-9a-f]{4}", // \uhhhh (h: hex)
escapeIgnorer + "\\\\" + "U[0-9a-f]{8}", // \Uhhhhhhhh (h: hex)
escapeIgnorer + "\\\\" + "x\\{[0-9a-f]{1,6}\\}", // \x{hhhh} (h: hex)
escapeIgnorer + "\\\\" + "x[0-9a-f]{2}", // \xhh (h: hex)
escapeIgnorer + "\\\\" + "u[0-9a-fA-F]{4}", // \uhhhh (h: hex)
escapeIgnorer + "\\\\" + "U[0-9a-fA-F]{8}", // \Uhhhhhhhh (h: hex)
escapeIgnorer + "\\\\" + "x\\{[0-9a-fA-F]{1,6}\\}", // \x{hhhh} (h: hex)
escapeIgnorer + "\\\\" + "x[0-9a-fA-F]{2}", // \xhh (h: hex)
escapeIgnorer + "\\\\" + "0[0-7]{1,3}", // \0ooo (o: octal)
]
case .backReference: