2021-05-11 coding►java►notes java - 正则 match 12345678910111213// string.match: yes OR noprivate static final String REGEX = "^@encrypt\\{(.*)}$";"@encrypt{file:mysql.username}".match(REGEX); // return true// PatternString REGEX = "^@encrypt\\{(.*)}$";Pattern PT = Pattern.compile(REGEX);Matcher m = PT.matcher(value);m.find(); // find matched subsequence one by one; yes OR nom.match(); // match entire string; yes OR no// group Newer spring boot - log4j Older vs code server