<script type="text/javascript"> var reg_expression=/[A-Z][a-z]celsz/; //只能匹配四个以上? var textString="Accelsz"; var result=reg_expression.test(textString); document.write(result+"<br>"); if(result) { document.write("正则表达式"+reg_expression+"匹配字符串\""+textString+"\".<br>"); } else alert("未找到匹配的模式!"); </script>