RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[a-zA-Z]+(([\'\,\.\-][a-zA-Z])?[a-zA-Z]*)*$
Description
This allows you to validate first names and last names in seperate fields. Instead of validating a full name in one field.
Matches
Sameul | O'Conner | Mary-Kate
Non-Matches
David Bugel | Robert1 | Robert M. Larry
Author Rating: Not yet rated. Hayk A
Source Written by Robert Dugre, modified
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Thank You Sir!
Name: Mathew
Date: 2/28/2011 6:46:34 AM
Comment:
Hi, Just want to say a big thanks for this regular expression. I had been trying to make one for hours and then came across this site and your regular expression. Works perfectly and just what i was looking for! so Thank You!!!


Title: thanks
Name: jake; validator
Date: 4/22/2010 5:12:46 AM
Comment:
thanks, great work,....only that if i try something like O'Con'nor it will not work, but if i make it like this O''connor, it will work, anyway, thanks so much


Title: thanks
Name: jake; validator
Date: 4/22/2010 3:48:09 AM
Comment:
thanks, great work,....only that if i try something like O'Con'nor it will not work, but if i make it like this O''connor, it will work, anyway, thanks so much


Title: thanks
Name: jake; validator
Date: 4/22/2010 3:47:42 AM
Comment:
thanks, great work,....only that if i try something like O'Con'nor it will not work, but if i make it like this O''connor, it will work, anyway, thanks so much


Title: great !
Name: Sandy
Date: 9/10/2009 5:37:16 AM
Comment:
Thanks ..


Title: great work!
Name: Edward Zee
Date: 4/15/2008 5:56:28 PM
Comment:
Thanks!


Title: Good Stuff
Name: Jim
Date: 6/9/2004 2:58:10 AM
Comment:
just what i wanted


Title: YEAH!
Name: coder
Date: 4/26/2004 2:33:18 AM
Comment:
Just what I was looking for!


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials