javaRegex匯總

來源:互聯網
上載者:User

標籤:

core java volume 1:c The character c \unnnn, \xnn, \0n, \0nn, \0nnn The code unit with the given hex or octal value \t, \n, \r, \f, \a, \e The control characters tab, newline, return, form feed, alert, and escape \cc The control character corresponding to the character c Character Classes [C1C2. . .] Any of the characters represented by C1, C2, . . . The Ci are characters, character ranges (c1-c2), or character classes [^. . .] Complement of character class [ . . . && . . .] Intersection of two character classes Predefined Character Classes . Any character except line terminators (or any character if the DOTALL flag is set) \d A digit [0-9] \D A nondigit [^0-9] \s A whitespace character [ \t\n\r\f\x0B] \S A non-whitespace character \w A word character [a-zA-Z0-9_] \W A nonword character \p{name} A named character class—see Table 12-9 \P{name} The complement of a named character class Boundary Matchers ^ $ Beginning, end of input (or beginning, end of line in multiline mode) \b A word boundary \B A nonword boundary Syntax Explanation \A Beginning of input \z End of input \Z End of input except final line terminator \G End of previous match Quantifiers X? Optional X X* X, 0 or more times X+ X, 1 or more times X{n} X{n,} X{n,m} X n times, at least n times, between n and m times Quantifier Suffixes ? Turn default (greedy) match into reluctant match + Turn default (greedy) match into possessive match Set Operations XY Any string from X, followed by any string from Y X|Y Any string from X or Y Grouping (X) Capture the string matching X as a group \n The match of the nth group Escapes \c The character c (must not be an alphabetic character) \Q . . . \E Quote . . . verbatim (? . . . ) Special construct—see API notes of Pattern class

javaRegex匯總

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.