meriwether
Programmer
trying to get my regex js to validate a last name field on a form.
/^[a-zA-Z\s]+$/;
this allows me to enter a alpha name (doe), or a alpha space alpha name (mc clury). i need to add ' for names such as o'neal but can't seem to get it.
any clues? i've tried:
/^[a-zA-Z\s']+$/;
but this allows only a ' as valid! ugh.
any help appreciated. thx.
/^[a-zA-Z\s]+$/;
this allows me to enter a alpha name (doe), or a alpha space alpha name (mc clury). i need to add ' for names such as o'neal but can't seem to get it.
any clues? i've tried:
/^[a-zA-Z\s']+$/;
but this allows only a ' as valid! ugh.
any help appreciated. thx.