Hello All,
I'm trying to implement java.util.Scanner.nextInt, which requires a
regular expression pattern to represent "Integer". I find it's hard to
express /NonASCIIDigit /because now Harmony regex does not support
/NonASCIIDigit/.
As our regex has supported "\p{javaLowerCase} Equivalent to
java.lang.Character.isLowerCase()", to facilitate the development of
j.u.Scanner, shall we provide support for "\p{javaDigit}", which is
equivalent to java.lang.Character.isDigit()? I could provide patch for
this feature if there is no objection. Thanks lot.
*
*You may want to refer to the number syntax in java.util.Scanner Spec:*
*/<QUOTE>
NonASCIIDigit :: = A non-ASCII character c for which
Character.isDigit(c) returns true
Non0Digit ::= [1-Rmax] | NonASCIIDigit
Digit ::= [0-Rmax] | NonASCIIDigit
GroupedNumeral :: = ( Non0Digit Digit? Digit? ( LocalGroupSeparator
Digit Digit Digit )+ )
Numeral ::= ( ( Digit+ ) | GroupedNumeral )
Integer ::= ( [-+]? ( Numeral ) ) | LocalPositivePrefix Numeral
LocalPositiveSuffix | LocalNegativePrefix Numeral LocalNegativeSuffix/
/</QUOTE>/
--
Richard Liang
China Software Development Lab, IBM