What caracters are in [[:jletterdigit:]] in JFlex ? I need to translate [[:jletterdigit:]] to classical regex.
2 Answers
To clarify Michael Lowman's answer: This is what the JFlex documentation says:
jletter and jletterdigit are predefined character classes. jletter includes all characters for which the Java function Character.isJavaIdentifierStart returns true and jletterdigit all characters for that Character.isJavaIdentifierPart returns true.
And what he wrote is the documentation of Character.isJavaIdentifierPart:
Determines if the specified character may be part of a Java identifier as other than the first character.
A character may be part of a Java identifier if any of the following are true:
it is a letter it is a currency symbol (such as '$') it is a connecting punctuation character (such as '_') it is a digit it is a numeric letter (such as a Roman numeral character) it is a combining mark it is a non-spacing mark isIdentifierIgnorable returns true for the character
isIdentifierIgnorable is in turn defined as:
Determines if the specified character (Unicode code point) should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
The following Unicode characters are ignorable in a Java identifier or a Unicode identifier:
ISO control characters that are not whitespace '\u0000' through '\u0008' '\u000E' through '\u001B' '\u007F' through '\u009F' all characters that have the FORMAT general category value

- 2,702
- 26
- 36
A character may be part of a Java identifier if any of the following are true:
it is a letter
it is a currency symbol (such as '$')
it is a connecting punctuation character (such as '_')
it is a digit
it is a numeric letter (such as a Roman numeral character)
it is a combining mark
it is a non-spacing mark
isIdentifierIgnorable returns true for the character

- 3,000
- 1
- 20
- 34