<a href="http://([/w]*)?[.]?xxx.xxxx.com[/]?[u]?[/]?([/w]*)?">(/w*)</a>/r?</b> ([/w]*)? 匹配零次或多次 字母或数字或下划线或汉字 [.]? 和 [/]?[u]?[/]? 匹配零次或者一次". / u /"特定字符 /r? 匹配换行符零次或者一次 同时匹配下面两种情况 <a href="http://xxx.xxxx.com/u/123456789">混合字符串</a> </b> <a href="http://xxx.xxxx..com">混合字符串</a> </b> 匹配完整链接:将链接用括号括住 <a href="(http://[/w]*?[.]?xxx.xxxx.comcom[/u//w]*?)">(/w*)</a>/r?</b>