MCPcopy Index your code
hub / github.com/Bit0r/java-util / match

Method match

src/main/java/util/CommonUtils.java:514–518  ·  view source on GitHub ↗

正则表达式验证 @param regex 正则表达式 @param str 需要验证的字符串 @return

(String regex, String str)

Source from the content-addressed store, hash-verified

512 * @return
513 */
514 public static boolean match(String regex, String str) {
515 Pattern pattern = Pattern.compile(regex);
516 Matcher matcher = pattern.matcher(str);
517 return matcher.matches();
518 }
519
520
521 /**

Callers

nothing calls this directly

Calls 1

matchesMethod · 0.80

Tested by

no test coverage detected