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

ConstructMatches
Characters
xThe 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
\tThe tab character ('\ ')
\nThe newline (line feed) character ('\ ')
\rThe carriage-return character ('\ ')
\fThe form-feed character ('\ ')
\aThe alert (bell) character ('\')
\eThe escape character ('\')
\cx The control character corresponding tox
Character classes
[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)
Predefined character classes
.Any character (may or may not matchline terminators)
\dA digit:[0-9]
\DA non-digit:[^0-9]
\sA whitespace character:[ \t\n\x0B\f\r]
\SA non-whitespace character:[^\s]
\wA word character:[a-zA-Z_0-9]
\WA non-word character:[^\w]
POSIX character classes (US-ASCII only)
\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]
Classes for Unicode blocks and categories
\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)
Boundary matchers
^The beginning of a line
$The end of a line
\bA word boundary
\BA non-word boundary
\AThe beginning of the input
\GThe end of the previous match
\ZThe end of the input but for the finalterminator, ifany
\zThe end of the input
Greedy quantifiers
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
Reluctant quantifiers
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
Possessive quantifiers
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
Logical operators
XY Xfollowed byY
X|Y EitherXorY
(X) X, as acapturing group
Back references
\n Whatever thenthcapturing groupmatched
Quotation
\Nothing, but quotes the following character
\QNothing, but quotes all characters until\E
\ENothing, but ends quoting started by\Q
Special constructs (non-capturing)
(?: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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值