the trouble is that
is a special char in java when creating a String, regardless of regexp or not.
eg String s = "";
you cannot use this for arbitrary chars though, String s = "a";
will give you a compile-time error. the valid chars are b, t, n, f, r, ", ' and
therefore to get a literal
in a string in java you need to escape it like so : \
. because of that, your only option is to NOT have these strings in java files, hence in an external file that is loaded by your java file. Pattern.LITERAL
won't help at all because you still need a valid java string, which d
isn't.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…