COMMENTS 指定使用注释和忽略空白,也就是".*a"==". *a #this is comments"我想这个在正则表达式很大,而且是在文件中输入时比较有用,平时我看也用不上。
MULTILINE In multiline mode the expressions ^ and $ match just after or just before, respectively, a line terminator or the end of the input sequence. By default these expressions only match at the beginning and the end of the entire input sequence 指定使用多行匹配模式,在默认模式下,^和$分别只匹配一个输入的开始和结束。 在这种模式下,^和$ 除了匹配整个输入的开始和结束外还匹配一个line terminator的后边和前边(不是前边和后边,就是说^匹配line terminator的后边$匹配line terminator的前边。
DOATALL 如指定了这个模式则"."可匹配任何字符包括line terminator UNIX_LINES 指定这个模式时只有/n被认为是line terminator而/r和/r/n都不是其他的我一时想不起来了,在具体介绍时再说吧。 </p> / public class TestReg2 {