Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java verify string is hexadecimal

private static final Pattern HEXADECIMAL_PATTERN = Pattern.compile("p{XDigit}+");

private boolean isHexadecimal(String input) {
    final Matcher matcher = HEXADECIMAL_PATTERN.matcher(input);
    return matcher.matches();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #verify #string #hexadecimal
ADD COMMENT
Topic
Name
8+4 =