set num=(length(原字符串)-length(replace(原字符串,'*#*','')))/3; 本文转自 Lee_吉 51CTO博客,原文链接:http://blog.51cto.com/12173069/1984045