`
nanjingjiangbiao_T
  • 浏览: 2605423 次
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

Eclipse中查找替换所使用的正则表达式的定义 .

 
阅读更多
ConstructMatchesCharactersCharacter classesPredefined character classesPOSIX character classes (US-ASCII only)Classes for Unicode blocks and categoriesBoundary matchersGreedy quantifiersReluctant quantifiersPossessive quantifiersLogical operatorsBack referencesQuotationSpecial constructs (non-capturing)
x The characterx
\\ The backslash character
\0n The character with octal value0n(0<=n<=7)
\0nn The character with octal value0nn(0<=n<=7)
\0mnn The character with octal value0mnn(0<=m<=3, 0<=n<=7)
\xhh The character with hexadecimalvalue0xhh
\uhhhh The character with hexadecimalvalue0xhhhh
\t The tab character ('\ ')
\n The newline (line feed) character ('\ ')
\r The carriage-return character ('\ ')
\f The form-feed character ('\ ')
\a The alert (bell) character ('\')
\e The escape character ('\')
\cx The control character corresponding tox
[abc] a,b, orc(simple class)
[^abc] Any character excepta,b, orc(negation)
[a-zA-Z] athroughzorAthroughZ, inclusive (range)
[a-d[m-p]] athroughd, ormthroughp:[a-dm-p](union)
[a-z&&[def]] d,e, orf(intersection)
[a-z&&[^bc]] athroughz, except forbandc:[ad-z](subtraction)
[a-z&&[^m-p]] athroughz, and notmthroughp:[a-lq-z](subtraction)
. Any character (may or may not matchline terminators)
\d A digit:[0-9]
\D A non-digit:[^0-9]
\s A whitespace character:[ \t\n\x0B\f\r]
\S A non-whitespace character:[^\s]
\w A word character:[a-zA-Z_0-9]
\W A non-word character:[^\w]
\p{Lower} A lower-case alphabetic character:[a-z]
\p{Upper} An upper-case alphabetic character:[A-Z]
\p{ASCII} All ASCII:[\x00-\x7F]
\p{Alpha} An alphabetic character:[\p{Lower}\p{Upper}]
\p{Digit} A decimal digit:[0-9]
\p{Alnum} An alphanumeric character:[\p{Alpha}\p{Digit}]
\p{Punct} Punctuation: One of!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
\p{Graph} A visible character:[\p{Alnum}\p{Punct}]
\p{Print} A printable character:[\p{Graph}]
\p{Blank} A space or a tab:[ \t]
\p{Cntrl} A control character:[\x00-\x1F\x7F]
\p{XDigit} A hexadecimal digit:[0-9a-fA-F]
\p{Space} A whitespace character:[ \t\n\x0B\f\r]
\p{InGreek} A character in the Greekblock (simpleblock)
\p{Lu} An uppercase letter (simplecategory)
\p{Sc} A currency symbol
\P{InGreek} Any character except one in the Greek block (negation)
[\p{L}&&[^\p{Lu}]] Any letter except an uppercase letter (subtraction)
^ The beginning of a line
$ The end of a line
\b A word boundary
\B A non-word boundary
\A The beginning of the input
\G The end of the previous match
\Z The end of the input but for the finalterminator, ifany
\z The end of the input
X? X, once or not at all
X* X, zero or more times
X+ X, one or more times
X{n} X, exactlyntimes
X{n,} X, at leastntimes
X{n,m} X, at leastnbut not more thanmtimes
X?? X, once or not at all
X*? X, zero or more times
X+? X, one or more times
X{n}? X, exactlyntimes
X{n,}? X, at leastntimes
X{n,m}? X, at leastnbut not more thanmtimes
X?+ X, once or not at all
X*+ X, zero or more times
X++ X, one or more times
X{n}+ X, exactlyntimes
X{n,}+ X, at leastntimes
X{n,m}+ X, at leastnbut not more thanmtimes
XY Xfollowed byY
X|Y EitherXorY
(X) X, as acapturing group
\n Whatever thenthcapturing groupmatched
\ Nothing, but quotes the following character
\Q Nothing, but quotes all characters until\E
\E Nothing, but ends quoting started by\Q
(?:X) X, as a non-capturing group
(?idmsux-idmsux) Nothing, but turns match flags on - off
(?idmsux-idmsux:X) X, as anon-capturing groupwith the given flags on - off
(?=X) X, via zero-width positive lookahead
(?!X) X, via zero-width negative lookahead
(?<=X) X, via zero-width positive lookbehind
(?<!X) X, via zero-width negative lookbehind
(?>X) X, as an independent, non-capturing group
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics