Skip to content

Commit

Permalink
Improve Java regex for constant matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Sep 6, 2023
1 parent 975411b commit 4eed9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion recaf-ui/src/main/resources/syntax/java.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
{
"name": "Constants",
"regex": "(?:0[xX][0-9a-fA-F]+)+|(?:\\b(?:[\\d._]*[\\d])\\b)+|\\b(?:true|false|null)\\b",
"regex": "\\b0(?:[xX][0-9a-fA-F]+|b[01]+|[0-7]+)\\b|\\b(?:[\\d_]+\\.\\d+|[\\d_]+)(?:[eE]-?[\\d_]+)?[fFdDlL]?\\b|\\b(?:true|false|null)\\b|'[\\\\]?.'",
"classes": [
"constant"
],
Expand Down

0 comments on commit 4eed9c1

Please sign in to comment.