var reg = /^[a-zA-Z]*(cake|icecream)[a-zA-Z]*$/gi; if(!reg.test(obj.value)){ return false; }原文链接:https://www.f2er.com/regex/362936.html
var reg = /^[a-zA-Z]*(cake|icecream)[a-zA-Z]*$/gi; if(!reg.test(obj.value)){ return false; }原文链接:https://www.f2er.com/regex/362936.html