Validate Localized Data with Regular Expressions

21
Anonymous Reader writes “Data validation is a common chore in programming any user interface. The Java language’s regular-expression support can make data validation easier. You can define a regular expression that describes valid data and then let the Java runtime see if it matches. But certain types of data have different formats in different locales. The ResourceBundle class lets you work with locale-specific data in an elegant way. This article shows how to combine the two techniques to solve a common data-entry problem.”

Link: ibm.com/developerworks