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 {