I am new to regular expressions and am having trouble setting one up. What I want is to allow only alphabets, numbers, commas, periods and hyphens. This is what I got:
var letters = /^[a-zA-Z0-9,. ]*$/;
I am having trouble figuring out how to include the hyphen. Please assist.
var letters = /^[-a-zA-Z0-9,. ]+$/;-), or other hyphens?