javascript - Allow only html break tag with regex -
i have following preg_match statment in php:
if(!preg_match("/^[a-za-z\d '-^\",.!?]+$/", $cont)){ //do }
in addition want allow br tags no other html tags, how can that?
also done same way js?
var ccheck = /^[0-9a-za-z '-^\",.!?]+$/; if(!cont.match(ccheck)){ //do }
Comments
Post a Comment