摘要: 1 匹配行首 '^' or '\A'断言区别:当使用m(多行)修饰符时,^匹配每行的行首,而\A仍然仅在整个字符串的开头进行匹配eg:$_ = "this is\na multi file"; s/^/BOL/g; #BOL this is #BOL a multi file s/\A/BOL/g; #BOL this is #a multi file2 匹配行尾 '$' or '\z'/'\Z''$' 在行尾之前进行匹配$_ = 'Here is some text\n 阅读全文
posted @ 2012-10-16 18:15 鍒樻爧 阅读(370) 评论(0) 推荐(0) 编辑