Skip to content

Instantly share code, notes, and snippets.

@fxh0707
fxh0707 / new_gist_file.java
Created April 27, 2023 07:36 — forked from yaoxinghuo/new_gist_file.java
Java的通配符比较字符串
public class Test3 {
private static final String PATTERN_LINE_START = "^";
private static final String PATTERN_LINE_END = "$";
private static final char[] META_CHARACTERS = { '$', '^', '[', ']', '(',
')', '{', '}', '|', '+', '.', '\\' };
public static void main(String[] args) throws Exception {