道路运输证ocr中交
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.dahe.mylibrary.utils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class PatternUtils {
|
||||
@@ -25,4 +26,13 @@ public class PatternUtils {
|
||||
public static boolean isLetter(String password){
|
||||
return Pattern.matches(REGEX_WORD, password);
|
||||
}
|
||||
|
||||
public static String getNumByStr(String str){
|
||||
Pattern compile = Pattern.compile("\\d+");
|
||||
Matcher matcher = compile.matcher(str);
|
||||
while (matcher.find()) {
|
||||
return matcher.group();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user