How to write javascript regular expression for this case?

Reply

Join Date: Mar 2006
Posts: 1
Reputation: zbx888 is an unknown quantity at this point 
Solved Threads: 0
zbx888 zbx888 is offline Offline
Newbie Poster

How to write javascript regular expression for this case?

 
0
  #1
Mar 27th, 2006
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:
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,359
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is online now Online
Nearly a Posting Maven

Re: How to write javascript regular expression for this case?

 
0
  #2
Mar 28th, 2006
  1. ^[A-Za-z -']*$
  2.  
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC