String s1 = "text is abc16hdb09jd8hsj1";
String s2 = "text is 12xiwebu90wu903jj";
String s3 = "text is 19jeudnpsowkslslx";
现在我想写一个正则表达式,匹配abc16hdb09jd8hsj1
这类的字符,这类字符**由数字和字母组成,至少包含一个数字和一个字母,开头和末尾可以是数字也可以是字母**
预期效果:
String s1 = "text is abc16hdb09jd8hsj1";
Pattern pattern = Pattern.compile(正则表达式);
Matcher matcher = pattern.matcher(s1);
System.out.println(mather.replaceAll("")); //预期输出为"text is ";
最后的正则表达式**不会匹配纯英文单词或者纯数字**
求解