Java tutorial
//package com.java2s; public class Main { public static boolean isRightHexStr(String str) { String reg = "^[0-9a-fA-F]+$"; return str.matches(reg); } }