< prev index next >

src/java.base/share/classes/java/util/regex/Pattern.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols

*** 393,403 **** * prior to a non-alphabetic character regardless of whether that character is * part of an unescaped construct. * * <p> Backslashes within string literals in Java source code are interpreted * as required by ! * <cite>The Java&trade; Language Specification</cite> * as either Unicode escapes (section 3.3) or other character escapes (section 3.10.6) * It is therefore necessary to double backslashes in string * literals that represent regular expressions to protect them from * interpretation by the Java bytecode compiler. The string literal * <code>"\b"</code>, for example, matches a single backspace character when --- 393,403 ---- * prior to a non-alphabetic character regardless of whether that character is * part of an unescaped construct. * * <p> Backslashes within string literals in Java source code are interpreted * as required by ! * <cite>The Java Language Specification</cite> * as either Unicode escapes (section 3.3) or other character escapes (section 3.10.6) * It is therefore necessary to double backslashes in string * literals that represent regular expressions to protect them from * interpretation by the Java bytecode compiler. The string literal * <code>"\b"</code>, for example, matches a single backspace character when
*** 542,552 **** * Standard #18: Unicode Regular Expression</i></a>, plus RL2.1 * Canonical Equivalents and RL2.2 Extended Grapheme Clusters. * <p> * <b>Unicode escape sequences</b> such as <code>\u2014</code> in Java source code * are processed as described in section 3.3 of ! * <cite>The Java&trade; Language Specification</cite>. * Such escape sequences are also implemented directly by the regular-expression * parser so that Unicode escapes can be used in expressions that are read from * files or from the keyboard. Thus the strings <code>"\u2014"</code> and * {@code "\\u2014"}, while not equal, compile into the same pattern, which * matches the character with hexadecimal value {@code 0x2014}. --- 542,552 ---- * Standard #18: Unicode Regular Expression</i></a>, plus RL2.1 * Canonical Equivalents and RL2.2 Extended Grapheme Clusters. * <p> * <b>Unicode escape sequences</b> such as <code>\u2014</code> in Java source code * are processed as described in section 3.3 of ! * <cite>The Java Language Specification</cite>. * Such escape sequences are also implemented directly by the regular-expression * parser so that Unicode escapes can be used in expressions that are read from * files or from the keyboard. Thus the strings <code>"\u2014"</code> and * {@code "\\u2014"}, while not equal, compile into the same pattern, which * matches the character with hexadecimal value {@code 0x2014}.
< prev index next >