{"id":89,"date":"2019-08-28T12:53:43","date_gmt":"2019-08-28T09:53:43","guid":{"rendered":"https:\/\/amsd.go.ro\/wordpress\/?p=89"},"modified":"2021-09-07T11:24:43","modified_gmt":"2021-09-07T08:24:43","slug":"summary-of-regular-expression-constructs-for-java","status":"publish","type":"post","link":"https:\/\/amsd.go.ro\/wordpress\/?p=89","title":{"rendered":"Summary of regular-expression constructs for Java"},"content":{"rendered":"<table summary=\"Regular expression constructs, and what they match\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n<tbody>\n<tr align=\"left\">\n<th id=\"construct\" align=\"left\" bgcolor=\"#CCCCFF\">Construct<\/th>\n<th id=\"matches\" align=\"left\" bgcolor=\"#CCCCFF\">Matches<\/th>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"characters\" colspan=\"2\">Characters<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><em>x<\/em><\/td>\n<td headers=\"matches\">The character <em>x<\/em><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\\\<\/tt><\/td>\n<td headers=\"matches\">The backslash character<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\0<\/tt><em>n<\/em><\/td>\n<td headers=\"matches\">The character with octal value <tt>0<\/tt><em>n<\/em> (0&nbsp;<tt>&lt;=<\/tt>&nbsp;<em>n<\/em>&nbsp;<tt>&lt;=<\/tt>&nbsp;7)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\0<\/tt><em>nn<\/em><\/td>\n<td headers=\"matches\">The character with octal value <tt>0<\/tt><em>nn<\/em> (0&nbsp;<tt>&lt;=<\/tt>&nbsp;<em>n<\/em>&nbsp;<tt>&lt;=<\/tt>&nbsp;7)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\0<\/tt><em>mnn<\/em><\/td>\n<td headers=\"matches\">The character with octal value <tt>0<\/tt><em>mnn<\/em> (0&nbsp;<tt>&lt;=<\/tt>&nbsp;<em>m<\/em>&nbsp;<tt>&lt;=<\/tt>&nbsp;3, 0&nbsp;<tt>&lt;=<\/tt>&nbsp;<em>n<\/em>&nbsp;<tt>&lt;=<\/tt>&nbsp;7)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\x<\/tt><em>hh<\/em><\/td>\n<td headers=\"matches\">The character with hexadecimal&nbsp;value&nbsp;<tt>0x<\/tt><em>hh<\/em><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\u<\/tt><em>hhhh<\/em><\/td>\n<td headers=\"matches\">The character with hexadecimal&nbsp;value&nbsp;<tt>0x<\/tt><em>hhhh<\/em><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\x<\/tt><em>{h&#8230;h}<\/em><\/td>\n<td headers=\"matches\">The character with hexadecimal&nbsp;value&nbsp;<tt>0x<\/tt><em>h&#8230;h<\/em> (<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Character.html#MIN_CODE_POINT\"><code>Character.MIN_CODE_POINT<\/code><\/a> &nbsp;&lt;=&nbsp;<tt>0x<\/tt><em>h&#8230;h<\/em>&nbsp;&lt;=&nbsp; <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Character.html#MAX_CODE_POINT\"><code>Character.MAX_CODE_POINT<\/code><\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"matches\" valign=\"top\"><tt>\\t<\/tt><\/td>\n<td headers=\"matches\">The tab character (<tt>'\\u0009'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\n<\/tt><\/td>\n<td headers=\"matches\">The newline (line feed) character (<tt>'\\u000A'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\r<\/tt><\/td>\n<td headers=\"matches\">The carriage-return character (<tt>'\\u000D'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\f<\/tt><\/td>\n<td headers=\"matches\">The form-feed character (<tt>'\\u000C'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\a<\/tt><\/td>\n<td headers=\"matches\">The alert (bell) character (<tt>'\\u0007'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\e<\/tt><\/td>\n<td headers=\"matches\">The escape character (<tt>'\\u001B'<\/tt>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct characters\" valign=\"top\"><tt>\\c<\/tt><em>x<\/em><\/td>\n<td headers=\"matches\">The control character corresponding to <em>x<\/em><\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"classes\" colspan=\"2\">Character classes<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[abc]<\/tt><\/td>\n<td headers=\"matches\"><tt>a<\/tt>, <tt>b<\/tt>, or <tt>c<\/tt> (simple class)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[^abc]<\/tt><\/td>\n<td headers=\"matches\">Any character except <tt>a<\/tt>, <tt>b<\/tt>, or <tt>c<\/tt> (negation)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[a-zA-Z]<\/tt><\/td>\n<td headers=\"matches\"><tt>a<\/tt> through <tt>z<\/tt> or <tt>A<\/tt> through <tt>Z<\/tt>, inclusive (range)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[a-d[m-p]]<\/tt><\/td>\n<td headers=\"matches\"><tt>a<\/tt> through <tt>d<\/tt>, or <tt>m<\/tt> through <tt>p<\/tt>: <tt>[a-dm-p]<\/tt> (union)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[a-z&amp;&amp;[def]]<\/tt><\/td>\n<td headers=\"matches\"><tt>d<\/tt>, <tt>e<\/tt>, or <tt>f<\/tt> (intersection)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[a-z&amp;&amp;[^bc]]<\/tt><\/td>\n<td headers=\"matches\"><tt>a<\/tt> through <tt>z<\/tt>, except for <tt>b<\/tt> and <tt>c<\/tt>: <tt>[ad-z]<\/tt> (subtraction)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct classes\" valign=\"top\"><tt>[a-z&amp;&amp;[^m-p]]<\/tt><\/td>\n<td headers=\"matches\"><tt>a<\/tt> through <tt>z<\/tt>, and not <tt>m<\/tt> through <tt>p<\/tt>: <tt>[a-lq-z]<\/tt>(subtraction)<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"predef\" colspan=\"2\">Predefined character classes<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>.<\/tt><\/td>\n<td headers=\"matches\">Any character (may or may not match <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#lt\">line terminators<\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\d<\/tt><\/td>\n<td headers=\"matches\">A digit: <tt>[0-9]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\D<\/tt><\/td>\n<td headers=\"matches\">A non-digit: <tt>[^0-9]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\s<\/tt><\/td>\n<td headers=\"matches\">A whitespace character: <tt>[ \\t\\n\\x0B\\f\\r]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\S<\/tt><\/td>\n<td headers=\"matches\">A non-whitespace character: <tt>[^\\s]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\w<\/tt><\/td>\n<td headers=\"matches\">A word character: <tt>[a-zA-Z_0-9]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct predef\" valign=\"top\"><tt>\\W<\/tt><\/td>\n<td headers=\"matches\">A non-word character: <tt>[^\\w]<\/tt><\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"posix\" colspan=\"2\">POSIX character classes (US-ASCII only)<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Lower}<\/tt><\/td>\n<td headers=\"matches\">A lower-case alphabetic character: <tt>[a-z]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Upper}<\/tt><\/td>\n<td headers=\"matches\">An upper-case alphabetic character:<tt>[A-Z]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{ASCII}<\/tt><\/td>\n<td headers=\"matches\">All ASCII:<tt>[\\x00-\\x7F]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Alpha}<\/tt><\/td>\n<td headers=\"matches\">An alphabetic character:<tt>[\\p{Lower}\\p{Upper}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Digit}<\/tt><\/td>\n<td headers=\"matches\">A decimal digit: <tt>[0-9]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Alnum}<\/tt><\/td>\n<td headers=\"matches\">An alphanumeric character:<tt>[\\p{Alpha}\\p{Digit}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Punct}<\/tt><\/td>\n<td headers=\"matches\">Punctuation: One of <tt>!\"#$%&amp;'()*+,-.\/:;&lt;=&gt;?@[\\]^_`{|}~<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Graph}<\/tt><\/td>\n<td headers=\"matches\">A visible character: <tt>[\\p{Alnum}\\p{Punct}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Print}<\/tt><\/td>\n<td headers=\"matches\">A printable character: <tt>[\\p{Graph}\\x20]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Blank}<\/tt><\/td>\n<td headers=\"matches\">A space or a tab: <tt>[ \\t]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Cntrl}<\/tt><\/td>\n<td headers=\"matches\">A control character: <tt>[\\x00-\\x1F\\x7F]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{XDigit}<\/tt><\/td>\n<td headers=\"matches\">A hexadecimal digit: <tt>[0-9a-fA-F]<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct posix\" valign=\"top\"><tt>\\p{Space}<\/tt><\/td>\n<td headers=\"matches\">A whitespace character: <tt>[ \\t\\n\\x0B\\f\\r]<\/tt><\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th colspan=\"2\">java.lang.Character classes (simple <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#jcc\">java character type<\/a>)<\/th>\n<\/tr>\n<tr>\n<td valign=\"top\"><tt>\\p{javaLowerCase}<\/tt><\/td>\n<td>Equivalent to java.lang.Character.isLowerCase()<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\"><tt>\\p{javaUpperCase}<\/tt><\/td>\n<td>Equivalent to java.lang.Character.isUpperCase()<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\"><tt>\\p{javaWhitespace}<\/tt><\/td>\n<td>Equivalent to java.lang.Character.isWhitespace()<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\"><tt>\\p{javaMirrored}<\/tt><\/td>\n<td>Equivalent to java.lang.Character.isMirrored()<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"unicode\" colspan=\"2\">Classes for Unicode scripts, blocks, categories and binary properties<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\p{IsLatin}<\/tt><\/td>\n<td headers=\"matches\">A Latin&nbsp;script character (<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#usc\">script<\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\p{InGreek}<\/tt><\/td>\n<td headers=\"matches\">A character in the Greek&nbsp;block (<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#ubc\">block<\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\p{Lu}<\/tt><\/td>\n<td headers=\"matches\">An uppercase letter (<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#ucc\">category<\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\p{IsAlphabetic}<\/tt><\/td>\n<td headers=\"matches\">An alphabetic character (<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#ubpc\">binary property<\/a>)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\p{Sc}<\/tt><\/td>\n<td headers=\"matches\">A currency symbol<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>\\P{InGreek}<\/tt><\/td>\n<td headers=\"matches\">Any character except one in the Greek block (negation)<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct unicode\" valign=\"top\"><tt>[\\p{L}&amp;&amp;[^\\p{Lu}]]&nbsp;<\/tt><\/td>\n<td headers=\"matches\">Any letter except an uppercase letter (subtraction)<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"bounds\" colspan=\"2\">Boundary matchers<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>^<\/tt><\/td>\n<td headers=\"matches\">The beginning of a line<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>$<\/tt><\/td>\n<td headers=\"matches\">The end of a line<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\b<\/tt><\/td>\n<td headers=\"matches\">A word boundary<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\B<\/tt><\/td>\n<td headers=\"matches\">A non-word boundary<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\A<\/tt><\/td>\n<td headers=\"matches\">The beginning of the input<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\G<\/tt><\/td>\n<td headers=\"matches\">The end of the previous match<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\Z<\/tt><\/td>\n<td headers=\"matches\">The end of the input but for the final <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#lt\">terminator<\/a>, if&nbsp;any<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct bounds\" valign=\"top\"><tt>\\z<\/tt><\/td>\n<td headers=\"matches\">The end of the input<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"greedy\" colspan=\"2\">Greedy quantifiers<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, once or not at all<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>*<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, zero or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, one or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>}<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, exactly <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,}<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct greedy\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,<\/tt><em>m<\/em><tt>}<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> but not more than <em>m<\/em> times<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"reluc\" colspan=\"2\">Reluctant quantifiers<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>??<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, once or not at all<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>*?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, zero or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>+?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, one or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>}?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, exactly <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,}?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct reluc\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,<\/tt><em>m<\/em><tt>}?<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> but not more than <em>m<\/em> times<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"poss\" colspan=\"2\">Possessive quantifiers<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>?+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, once or not at all<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>*+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, zero or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>++<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, one or more times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>}+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, exactly <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,}+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> times<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct poss\" valign=\"top\"><em>X<\/em><tt>{<\/tt><em>n<\/em><tt>,<\/tt><em>m<\/em><tt>}+<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, at least <em>n<\/em> but not more than <em>m<\/em> times<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"logical\" colspan=\"2\">Logical operators<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct logical\" valign=\"top\"><em>XY<\/em><\/td>\n<td headers=\"matches\"><em>X<\/em> followed by <em>Y<\/em><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct logical\" valign=\"top\"><em>X<\/em><tt>|<\/tt><em>Y<\/em><\/td>\n<td headers=\"matches\">Either <em>X<\/em> or <em>Y<\/em><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct logical\" valign=\"top\"><tt>(<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\">X, as a <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#cg\">capturing group<\/a><\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"backref\" colspan=\"2\">Back references<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct backref\" valign=\"bottom\"><tt>\\<\/tt><em>n<\/em><\/td>\n<td headers=\"matches\" valign=\"bottom\">Whatever the <em>n<\/em><sup>th<\/sup> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#cg\">capturing group<\/a> matched<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct backref\" valign=\"bottom\"><tt>\\<\/tt><em>k<\/em>&lt;<em>name<\/em>&gt;<\/td>\n<td headers=\"matches\" valign=\"bottom\">Whatever the <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#groupname\">named-capturing group<\/a> &#8220;name&#8221; matched<\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"quot\" colspan=\"2\">Quotation<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct quot\" valign=\"top\"><tt>\\<\/tt><\/td>\n<td headers=\"matches\">Nothing, but quotes the following character<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct quot\" valign=\"top\"><tt>\\Q<\/tt><\/td>\n<td headers=\"matches\">Nothing, but quotes all characters until <tt>\\E<\/tt><\/td>\n<\/tr>\n<tr>\n<td headers=\"construct quot\" valign=\"top\"><tt>\\E<\/tt><\/td>\n<td headers=\"matches\">Nothing, but ends quoting started by <tt>\\Q<\/tt><\/td>\n<\/tr>\n<tr>\n<th>&nbsp;<\/th>\n<\/tr>\n<tr align=\"left\">\n<th id=\"special\" colspan=\"2\">Special constructs (named-capturing and non-capturing)<\/th>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?&lt;<a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#groupname\">name<\/a>&gt;<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, as a named-capturing group<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?:<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, as a non-capturing group<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?idmsuxU-idmsuxU)&nbsp;<\/tt><\/td>\n<td headers=\"matches\">Nothing, but turns match flags <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#CASE_INSENSITIVE\">i<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNIX_LINES\">d<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#MULTILINE\">m<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#DOTALL\">s<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNICODE_CASE\">u<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#COMMENTS\">x<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNICODE_CHARACTER_CLASS\">U<\/a> on &#8211; off<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?idmsux-idmsux:<\/tt><em>X<\/em><tt>)<\/tt>&nbsp;&nbsp;<\/td>\n<td headers=\"matches\"><em>X<\/em>, as a <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#cg\">non-capturing group<\/a> with the given flags <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#CASE_INSENSITIVE\">i<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNIX_LINES\">d<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#MULTILINE\">m<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#DOTALL\">s<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNICODE_CASE\">u<\/a> <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#COMMENTS\">x<\/a> on &#8211; off<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?=<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, via zero-width positive lookahead<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?!<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, via zero-width negative lookahead<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?&lt;=<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, via zero-width positive lookbehind<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?&lt;!<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, via zero-width negative lookbehind<\/td>\n<\/tr>\n<tr>\n<td headers=\"construct special\" valign=\"top\"><tt>(?&gt;<\/tt><em>X<\/em><tt>)<\/tt><\/td>\n<td headers=\"matches\"><em>X<\/em>, as an independent, non-capturing group<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>Backslashes, escapes, and quoting<\/h4>\n<p>The backslash character (<tt>'\\'<\/tt>) serves to introduce escaped constructs, as defined in the table above, as well as to quote characters that otherwise would be interpreted as unescaped constructs. Thus the expression <tt>\\\\<\/tt> matches a single backslash and <tt>\\{<\/tt> matches a left brace.<\/p>\n<p>It is an error to use a backslash prior to any alphabetic character that does not denote an escaped construct; these are reserved for future extensions to the regular-expression language. A backslash may be used prior to a non-alphabetic character regardless of whether that character is part of an unescaped construct.<\/p>\n<p><a name=\"bs\"><\/a> 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 <tt>\"\\b\"<\/tt>, for example, matches a single backspace character when interpreted as a regular expression, while <tt>\"\\\\b\"<\/tt> matches a word boundary. The string literal <tt>\"\\(hello\\)\"<\/tt> is illegal and leads to a compile-time error; in order to match the string <tt>(hello)<\/tt> the string literal <tt>\"\\\\(hello\\\\)\"<\/tt> must be used. <a name=\"cc\"><\/a><\/p>\n<h4><a name=\"cc\"><\/a> Character Classes<\/h4>\n<p>Character classes may appear within other character classes, and may be composed by the union operator (implicit) and the intersection operator (<tt>&amp;&amp;<\/tt>). The union operator denotes a class that contains every character that is in at least one of its operand classes. The intersection operator denotes a class that contains every character that is in both of its operand classes.<\/p>\n<p>The precedence of character-class operators is as follows, from highest to lowest:<\/p>\n<blockquote>\n<table summary=\"Precedence of character class operators.\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n<tbody>\n<tr>\n<th>1&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td>Literal escape&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td><tt>\\x<\/tt><\/td>\n<\/tr>\n<tr>\n<th>2&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td>Grouping<\/td>\n<td><tt>[...]<\/tt><\/td>\n<\/tr>\n<tr>\n<th>3&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td>Range<\/td>\n<td><tt>a-z<\/tt><\/td>\n<\/tr>\n<tr>\n<th>4&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td>Union<\/td>\n<td><tt>[a-e][i-u]<\/tt><\/td>\n<\/tr>\n<tr>\n<th>5&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td>Intersection<\/td>\n<td><tt>[a-z&amp;&amp;[aeiou]]<\/tt><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/blockquote>\n<p><a name=\"cc\"><\/a> Note that a different set of metacharacters are in effect inside a character class than outside a character class. For instance, the regular expression <tt>.<\/tt> loses its special meaning inside a character class, while the expression <tt>-<\/tt> becomes a range forming metacharacter. <a name=\"lt\"><\/a><\/p>\n<h4><a name=\"lt\"><\/a> Line terminators<\/h4>\n<p>A <em>line terminator<\/em> is a one- or two-character sequence that marks the end of a line of the input character sequence. The following are recognized as line terminators:<\/p>\n<ul>\n<li>A newline (line feed) character&nbsp;(<tt>'\\n'<\/tt>),<\/li>\n<li>A carriage-return character followed immediately by a newline character&nbsp;(<tt>\"\\r\\n\"<\/tt>),<\/li>\n<li>A standalone carriage-return character&nbsp;(<tt>'\\r'<\/tt>),<\/li>\n<li>A next-line character&nbsp;(<tt>'\\u0085'<\/tt>),<\/li>\n<li>A line-separator character&nbsp;(<tt>'\\u2028'<\/tt>), or<\/li>\n<li>A paragraph-separator character&nbsp;(<tt>'\\u2029<\/tt>).<\/li>\n<\/ul>\n<p><a name=\"lt\"><\/a>If <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNIX_LINES\"><code>UNIX_LINES<\/code><\/a> mode is activated, then the only line terminators recognized are newline characters.<\/p>\n<p>The regular expression <tt>.<\/tt> matches any character except a line terminator unless the <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#DOTALL\"><code>DOTALL<\/code><\/a> flag is specified.<\/p>\n<p>By default, the regular expressions <tt>^<\/tt> and <tt>$<\/tt> ignore line terminators and only match at the beginning and the end, respectively, of the entire input sequence. If <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#MULTILINE\"><code>MULTILINE<\/code><\/a> mode is activated then <tt>^<\/tt> matches at the beginning of input and after any line terminator except at the end of input. When in <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#MULTILINE\"><code>MULTILINE<\/code><\/a> mode <tt>$<\/tt> matches just before a line terminator or the end of the input sequence. <a name=\"cg\"><\/a><\/p>\n<h4><a name=\"cg\"><\/a> Groups and capturing<\/h4>\n<p><a name=\"cg\"><\/a><\/p>\n<h5>Group number<\/h5>\n<p>Capturing groups are numbered by counting their opening parentheses from left to right. In the expression <tt>((A)(B(C)))<\/tt>, for example, there are four such groups:<\/p>\n<blockquote>\n<table summary=\"Capturing group numberings\" cellspacing=\"0\" cellpadding=\"1\">\n<tbody>\n<tr>\n<th>1&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td><tt>((A)(B(C)))<\/tt><\/td>\n<\/tr>\n<tr>\n<th>2&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td><tt>(A)<\/tt><\/td>\n<\/tr>\n<tr>\n<th>3&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td><tt>(B(C))<\/tt><\/td>\n<\/tr>\n<tr>\n<th>4&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<td><tt>(C)<\/tt><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/blockquote>\n<p>Group zero always stands for the entire expression.<\/p>\n<p><a name=\"gnumber\"><\/a> Capturing groups are so named because, during a match, each subsequence of the input sequence that matches such a group is saved. The captured subsequence may be used later in the expression, via a back reference, and may also be retrieved from the matcher once the match operation is complete. <a name=\"groupname\"><\/a><\/p>\n<h5><a name=\"groupname\"><\/a> Group name<\/h5>\n<p>A capturing group can also be assigned a &#8220;name&#8221;, a <tt>named-capturing group<\/tt>, and then be back-referenced later by the &#8220;name&#8221;. Group names are composed of the following characters. The first character must be a <tt>letter<\/tt>.<\/p>\n<ul>\n<li>The uppercase letters <tt>'A'<\/tt> through <tt>'Z'<\/tt> (<tt>'\\u0041'<\/tt>&nbsp;through&nbsp;<tt>'\\u005a'<\/tt>),<\/li>\n<li>The lowercase letters <tt>'a'<\/tt> through <tt>'z'<\/tt> (<tt>'\\u0061'<\/tt>&nbsp;through&nbsp;<tt>'\\u007a'<\/tt>),<\/li>\n<li>The digits <tt>'0'<\/tt> through <tt>'9'<\/tt> (<tt>'\\u0030'<\/tt>&nbsp;through&nbsp;<tt>'\\u0039'<\/tt>),<\/li>\n<\/ul>\n<p><a name=\"groupname\"><\/a> A <tt>named-capturing group<\/tt> is still numbered as described in <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#gnumber\">Group number<\/a>.<\/p>\n<p>The captured input associated with a group is always the subsequence that the group most recently matched. If a group is evaluated a second time because of quantification then its previously-captured value, if any, will be retained if the second evaluation fails. Matching the string <tt>\"aba\"<\/tt> against the expression <tt>(a(b)?)+<\/tt>, for example, leaves group two set to <tt>\"b\"<\/tt>. All captured input is discarded at the beginning of each match.<\/p>\n<p>Groups beginning with <tt>(?<\/tt> are either pure, <em>non-capturing<\/em> groups that do not capture text and do not count towards the group total, or <em>named-capturing<\/em> group.<\/p>\n<h4>Unicode support<\/h4>\n<p>This class is in conformance with Level 1 of <a href=\"http:\/\/www.unicode.org\/reports\/tr18\/\"><em>Unicode Technical Standard #18: Unicode Regular Expression<\/em><\/a>, plus RL2.1 Canonical Equivalents.<\/p>\n<p><strong>Unicode escape sequences<\/strong> such as <tt>\\u2014<\/tt> 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 <tt>\"\\u2014\"<\/tt> and <tt>\"\\\\u2014\"<\/tt>, while not equal, compile into the same pattern, which matches the character with hexadecimal value <tt>0x2014<\/tt>.<\/p>\n<p>A Unicode character can also be represented in a regular-expression by using its <strong>Hex notation<\/strong>(hexadecimal code point value) directly as described in construct <tt>\\x{...}<\/tt>, for example a supplementary character U+2011F can be specified as <tt>\\x{2011F}<\/tt>, instead of two consecutive Unicode escape sequences of the surrogate pair <tt>\\uD840<\/tt><tt>\\uDD1F<\/tt>.<\/p>\n<p>Unicode scripts, blocks, categories and binary properties are written with the <tt>\\p<\/tt> and <tt>\\P<\/tt> constructs as in Perl. <tt>\\p{<\/tt><em>prop<\/em><tt>}<\/tt> matches if the input has the property <em>prop<\/em>, while <tt>\\P{<\/tt><em>prop<\/em><tt>}<\/tt> does not match if the input has that property.<\/p>\n<p>Scripts, blocks, categories and binary properties can be used both inside and outside of a character class. <a name=\"usc\"><\/a><\/p>\n<p><a name=\"usc\"><\/a> <strong>Scripts<\/strong> are specified either with the prefix <code>Is<\/code>, as in <code>IsHiragana<\/code>, or by using the <code>script<\/code> keyword (or its short form <code>sc<\/code>)as in <code>script=Hiragana<\/code> or <code>sc=Hiragana<\/code>.<\/p>\n<p><a name=\"usc\"><\/a> The script names supported by <code>Pattern<\/code> are the valid script names accepted and defined by <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Character.UnicodeScript.html#forName(java.lang.String)\"><code>UnicodeScript.forName<\/code><\/a>. <a name=\"ubc\"><\/a><\/p>\n<p><a name=\"ubc\"><\/a> <strong>Blocks<\/strong> are specified with the prefix <code>In<\/code>, as in <code>InMongolian<\/code>, or by using the keyword <code>block<\/code> (or its short form <code>blk<\/code>) as in <code>block=Mongolian<\/code> or <code>blk=Mongolian<\/code>.<\/p>\n<p><a name=\"ubc\"><\/a> The block names supported by <code>Pattern<\/code> are the valid block names accepted and defined by <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Character.UnicodeBlock.html#forName(java.lang.String)\"><code>UnicodeBlock.forName<\/code><\/a>.<\/p>\n<p><a name=\"ucc\"><\/a> <strong>Categories<\/strong> may be specified with the optional prefix <code>Is<\/code>: Both <code>\\p{L}<\/code> and <code>\\p{IsL}<\/code> denote the category of Unicode letters. Same as scripts and blocks, categories can also be specified by using the keyword <code>general_category<\/code> (or its short form <code>gc<\/code>) as in <code>general_category=Lu<\/code> or <code>gc=Lu<\/code>.<\/p>\n<p><a name=\"ucc\"><\/a> The supported categories are those of <a href=\"http:\/\/www.unicode.org\/unicode\/standard\/standard.html\"> <em>The Unicode Standard<\/em><\/a> in the version specified by the <a title=\"class in java.lang\" href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Character.html\"><code>Character<\/code><\/a> class. The category names are those defined in the Standard, both normative and informative.<\/p>\n<p><a name=\"ubpc\"><\/a> <strong>Binary properties<\/strong> are specified with the prefix <code>Is<\/code>, as in <code>IsAlphabetic<\/code>. The supported binary properties by <code>Pattern<\/code> are<\/p>\n<p><a name=\"ubpc\"><\/a><\/p>\n<ul>\n<li>Alphabetic<\/li>\n<li>Ideographic<\/li>\n<li>Letter<\/li>\n<li>Lowercase<\/li>\n<li>Uppercase<\/li>\n<li>Titlecase<\/li>\n<li>Punctuation<\/li>\n<li>Control<\/li>\n<li>White_Space<\/li>\n<li>Digit<\/li>\n<li>Hex_Digit<\/li>\n<li>Noncharacter_Code_Point<\/li>\n<li>Assigned<\/li>\n<\/ul>\n<p><a name=\"ubpc\"><\/a><\/p>\n<p><a name=\"ubpc\"><\/a> <strong>Predefined Character classes<\/strong> and <strong>POSIX character classes<\/strong> are in conformance with the recommendation of <em>Annex C: Compatibility Properties<\/em> of <a href=\"http:\/\/www.unicode.org\/reports\/tr18\/\"><em>Unicode Regular Expression <\/em><\/a>, when <a href=\"https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/util\/regex\/Pattern.html#UNICODE_CHARACTER_CLASS\"><code>UNICODE_CHARACTER_CLASS<\/code><\/a> flag is specified.<\/p>\n<p>&nbsp;<\/p>\n<table summary=\"predefined and posix character classes in Unicode mode\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n<tbody>\n<tr align=\"left\">\n<th id=\"classes\" align=\"left\" bgcolor=\"#CCCCFF\">Classes<\/th>\n<th id=\"matches\" align=\"left\" bgcolor=\"#CCCCFF\">Matches<\/th>\n<\/tr>\n<tr>\n<td><tt>\\p{Lower}<\/tt><\/td>\n<td>A lowercase character:<tt>\\p{IsLowercase}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Upper}<\/tt><\/td>\n<td>An uppercase character:<tt>\\p{IsUppercase}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{ASCII}<\/tt><\/td>\n<td>All ASCII:<tt>[\\x00-\\x7F]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Alpha}<\/tt><\/td>\n<td>An alphabetic character:<tt>\\p{IsAlphabetic}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Digit}<\/tt><\/td>\n<td>A decimal digit character:<tt>p{IsDigit}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Alnum}<\/tt><\/td>\n<td>An alphanumeric character:<tt>[\\p{IsAlphabetic}\\p{IsDigit}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Punct}<\/tt><\/td>\n<td>A punctuation character:<tt>p{IsPunctuation}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Graph}<\/tt><\/td>\n<td>A visible character: <tt>[^\\p{IsWhite_Space}\\p{gc=Cc}\\p{gc=Cs}\\p{gc=Cn}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Print}<\/tt><\/td>\n<td>A printable character: <tt>[\\p{Graph}\\p{Blank}&amp;&amp;[^\\p{Cntrl}]]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Blank}<\/tt><\/td>\n<td>A space or a tab: <tt>[\\p{IsWhite_Space}&amp;&amp;[^\\p{gc=Zl}\\p{gc=Zp}\\x0a\\x0b\\x0c\\x0d\\x85]]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Cntrl}<\/tt><\/td>\n<td>A control character: <tt>\\p{gc=Cc}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{XDigit}<\/tt><\/td>\n<td>A hexadecimal digit: <tt>[\\p{gc=Nd}\\p{IsHex_Digit}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\p{Space}<\/tt><\/td>\n<td>A whitespace character:<tt>\\p{IsWhite_Space}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\d<\/tt><\/td>\n<td>A digit: <tt>\\p{IsDigit}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\D<\/tt><\/td>\n<td>A non-digit: <tt>[^\\d]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\s<\/tt><\/td>\n<td>A whitespace character: <tt>\\p{IsWhite_Space}<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\S<\/tt><\/td>\n<td>A non-whitespace character: <tt>[^\\s]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\w<\/tt><\/td>\n<td>A word character: <tt>[\\p{Alpha}\\p{gc=Mn}\\p{gc=Me}\\p{gc=Mc}\\p{Digit}\\p{gc=Pc}]<\/tt><\/td>\n<\/tr>\n<tr>\n<td><tt>\\W<\/tt><\/td>\n<td>A non-word character: <tt>[^\\w]<\/tt><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Construct Matches &nbsp; Characters x The character x \\\\ The backslash character \\0n The character with octal value 0n (0&nbsp;&lt;=&nbsp;n&nbsp;&lt;=&nbsp;7) \\0nn The character with octal value 0nn (0&nbsp;&lt;=&nbsp;n&nbsp;&lt;=&nbsp;7) \\0mnn The character with octal value 0mnn (0&nbsp;&lt;=&nbsp;m&nbsp;&lt;=&nbsp;3, 0&nbsp;&lt;=&nbsp;n&nbsp;&lt;=&nbsp;7) \\xhh The character [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/amsd.go.ro\/wordpress\/?p=89#more-89\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Summary of regular-expression constructs for Java<\/span><\/a><\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8,10,12],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ps_20","tag-ps_32","tag-ps_17"],"_links":{"self":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89"}],"version-history":[{"count":1,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":155,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions\/155"}],"wp:attachment":[{"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amsd.go.ro\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}