Pattern escaping distinguishes glob syntax from source text that happens to use the same characters.
Patterns use glob control characters, so *, ?, and character classes have
special meaning unless they are escaped with a backslash. The anchors ^ and
$ are special only at the beginning and end of a pattern part. Use ^^ at the
beginning to match a literal caret and $$ at the end to match a literal dollar
sign.
The sequence \n separates consecutive pattern lines. Use \\n when the source
line contains the literal characters \n.
The pattern Use \* to multiply treats * as source text instead of a
wildcard. It matches a line in
glob-patterns.txt.
Use * to multiply
$ is an end anchor only at the end of a pattern. Use $$ there when the
source line itself ends with a dollar sign.
The value ends with $
^ is a start anchor only at the start of a pattern. Use ^^ there when the
source line itself starts with a caret.
^ starts with caret
Use \\n when the source line contains the characters backslash and n. The
quote characters are written as \" so the instruction remains valid XML.
<embed-code file="$java/org/showcase/PatternSamples.java" line="ESCAPED_NEWLINE = "\n"">
private static final String ESCAPED_NEWLINE = "\n";