Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6053153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:00:29+00:00 2026-05-23T08:00:29+00:00

I am using the following JavaScript regexp to validate users First and Last names

  • 0

I am using the following JavaScript regexp to validate users First and Last names

var regexp = /^((?=[a-z \']).)+$/i;

var val1 = "Normal Text' Compromised";       // true
var val2 = "UTF Text' Połącz Słońce w Mózu"; // false  <---- UTF-8
var val3 = "Illegal char: Blac & White";     // false

example at: http://jsfiddle.net/PR4T2/1/


Question:

Is there any way to make the regex “UTF-8 insensitive” in order to let users use UTF characters ?

I know that UTF is not supported in JS validation yet but I was wondering if there is any workaround.
I also do not want to exclude all illegal characters manually like:

var regexp = /^((?![0-9\~\!\@\#\$\%\^\&\*\(\)\_\+\=\-\[\]\{\}\;\:\"\\\/\<\>\?]).)+$/;

Edit:

Criteria are characters: a-z, space, \, ‘ and any other UTF char that can be found in user
First/Last Name like here.

I’m looking for something more general like \p{xx} sequencer in PHP

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:00:29+00:00Added an answer on May 23, 2026 at 8:00 am

    The XRegExp library Unicode plugin adds Unicode character class support (like “\p{L}“) to JavaScript regular expressions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following regexp to validate numbers in my javascript file: var valid
I'm using the following javascript regex: var pattern = new RegExp(^ + term +
I'm using the following JavaScript code: <script language=JavaScript1.2 type=text/javascript> function CreateBookmarkLink(title, url) { if
I am using the following JavaScript code: var a = [23, 34, 45, 33];
I'm using the following jQuery plugins (along with the jQuery plugin): <script type=text/javascript src=scripts/jquery.scrollTo-min.js></script>
I am using the following javascript regex email validate function but it doen't seem
I'm using the following lines of JavaScript to validate an input as a valid
I'm using the following javascript code to display xml/xsl: function loadXMLDoc(fname) { var xmlDoc;
I'm using the following javascript: if (theSelection) { for (var i = 0, l
I'm wondering if using the following Javascript code is reliable: if (!document.cookie) { alert('Cookies

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.