Name reg ex - allow extended characters but not numbers

Posted on 2008-11-06
Last Modified: 2012-06-21
i need to have a reg ex that will allow for french characters, i have been using this

var regExName = /^[a-z\u0000-\u10FFFF]+([\s\.\-\']?[a-z\u0000-\u10FFFF]+)?$/i

but on testing it allows numeric values, i must accept only alpha, this is for JavaScript  on client side validation, i will probably be applying it to server side in CF

the following is a test name that it should accept

john pol-jons st.onge o'reilly (double names with spaces, double names with hyphen, names with a period ., and names with an apostrophe) which currently all work, just need to get rid of the accepting numbers, i could just add a second check i guess and that what i will be doing  just hope this reg ex can be change to meet the no numerics requirement

Question by:Jester_48
    LVL 82

    Accepted Solution

    var regExName = /^[a-z\u00C0-\u01FF]+([\s\.\-\']?[a-z\u00C0-\u01FF]+)?$/i
    LVL 24

    Author Comment

    excellent, thank you!!
    LVL 82

    Expert Comment

    you are welcome

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    I have been reconstructing a PHP-based application that has grown into a full blown interface system over the last ten years by a developer that has now gone into business for himself building websites. I am not incredibly fond of writing PHP code o…
    Do you hate spam? I do, and I am willing to bet you do as well. I often wonder, though, "if people hate spam so much, why do they still post their email addresses on the web?" I'm not talking about a plain-text posting here. I am referring to the fa…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now