package com.marslei.utils;import java.util.regex.Matcher;import java.util.regex.Pattern;public class Utils { public String get(String raw) { Pattern pattern=Pattern.compile("^\\d\\w$"); Matcher matcher=pattern.matcher(raw); if (matcher.find()) { return matcher.group(); } else { return ""; } } public static void main(String[] args) { Utils utils=new Utils(); String value=utils.get("1a"); System.out.println(value); }}