在js其他地方都很简单的/i忽略大小写...
在java里面我找了半天没发现.. 最后去sun的forum才找到答案
如匹配 AbC不区分大小写是 (?i)abc
其中(?i)的位置任意.
文档如下, 摘自Pettern类的javadoc
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 a non-capturing group with 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 |