Java tutorial
//package com.java2s; public class Main { public static boolean isOrgCode(String OrgCode) { String regex = "[a-zA-Z0-9]{8}-[a-zA-Z0-9]"; return OrgCode.matches(regex); } }