1、单词边界
the cat scattered his food all over the room 正则表达式 cat 匹配结果 cat cat
用\b 指定单词边界,\b用来匹配一个单词的开始或结尾
the cat scattered his food all over the room 正则表达式 \bcat\b 匹配结果 cat
位置匹配
原文:http://www.cnblogs.com/ccgjava/p/7297322.html