954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to write javascript regular expression for this case?

I want to use Javascript to validate user input for last name and first name by regular expression and just allow usa alphebetical letters plus space, apostroph and hyphen such as O'Neill and Lacova-D'elia.

How to write regular expression to validate user's input? Thanks a lot!
:rolleyes:

zbx888
Newbie Poster
1 post since Mar 2006
Reputation Points: 10
Solved Threads: 0
 
^[A-Za-z -']*$
masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You