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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([ \u00c0-\u01ffa-zA-Z'])+$
Description
Expression to match names and dis-allow any attempts to send evil characters. In particular, it tries to allow non-english names by allowing unicode characters.
Matches
Jon Doe | Jørn | Mc'Neelan
Non-Matches
Henry); hacking attempt
Author Rating: The rating for this expression. tom ferguson
Source
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: Not Working with Asp.Net
Name: Ricky
Date: 1/18/2013 3:27:05 AM
Comment:
Can anyone tell me how to use this RegEx to validate a TextBox with A-Z, a-z, space and letters like é. When I tried it is not working. Thanks


Title: Many thanks
Name: Paulo Lima
Date: 10/20/2008 8:30:40 AM
Comment:
simple and effective.


Title: Many thanks
Name: Paulo Lima
Date: 10/20/2008 8:08:09 AM
Comment:
simple and effective.


Title: Nice one
Name: nina_bee
Date: 6/6/2008 7:24:59 AM
Comment:
Thanks this is exactly what I needed


Title: Starting with numbers
Name: Ken
Date: 10/15/2004 9:07:47 PM
Comment:
To W.D. This expression will not work if you are starting a value with numbers


Title: Another First Name and Last Name RegEx
Name: W. D.
Date: 1/11/2004 5:05:20 AM
Comment:
I couldn't get Tom's to work for me. Here's one I made up from this page and other sources on the 'Net: ^[A-Za-zÀ-ÖØ-öø-ÿ '\-\.]{1,22}$ Seems to work the way one would expect. Works for: "Jill St. John", as well as my good friend: "Jørnç McO'Donald-Öztürk" Don't know of any names longer than 22 characters. Hope it saves you some time!


Title: Those rare names with periods
Name: Adam Smith
Date: 6/7/2003 9:03:17 PM
Comment:
It fails the "Jill St. John" test. I added "\." to the end for my purposes, but that allows "Jill St." and Richard Bysouth's addition allows "Williams-".


Title: Yep!
Name: xMANIGHTx
Date: 5/23/2003 8:48:29 AM
Comment:
Great exp!


Title: Matching names - missing part
Name: Richard Bysouth
Date: 4/24/2003 6:01:13 AM
Comment:
This expression needs one more part to allow for "double-barrelled" surnames such as Williams-Jones. Expression should then be: ^([ \u00c0-\u01ffa-zA-Z'\-])+$ otherwise, works great - have tested it on many names that i have in our DB from all over the world!


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