0

Hi all,
How could we validate that given string should only contains alphabetic characters,
pls share some ideas,
thanks in advance

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by anand01
0
  1. use the String matches(Regex) method with a regular expression for whatever you consider to be a letter in whatever languages you need to support.
  2. check each char in the String one at a time using Character's isLetter(char) method which knows about non-english characters.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.