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 6939263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:36:01+00:00 2026-05-27T12:36:01+00:00

I have a problem with an regular expression which allow me to put a

  • 0

I have a problem with an regular expression which allow me to put a name lets say if an institution which can contain special characters for other languages, white space and – char.
I know that expression i created:

/^[a-zA-Z- "\']*$/

will allow chars from a to z and -‘” chars and white space. But when i type żźćąś or other languages special chars string is not valid, but i want it to be valid.

Second expression which i created:

/^[^\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\`\\1\\2\\3\\4\\5\\6\\7\\8\\9\\0\\_\\+\\=\\{\\}\\:\\"\\;\\\\\<\\>\\?\\,\\.\\/\ ]*$/

allows a-z characters without characters disallowed above. But I dont disallow white space in regex above but when i type something with space like that for example:

"Bielsko Biała"

Its not valid, but when i type it together:

"BielskoBiała"

it is valid with ą character. So i’d like to allow special chars like żźćąśł and others from other languages but also like to allow white spaces and i dont knot how to do it.

When i was using Alpha validator it was ok but dont allow to put -‘” chars which i also want to allow.

  • 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-27T12:36:01+00:00Added an answer on May 27, 2026 at 12:36 pm

    First you have to enable UTF-8 support with the u switch. Then you can match unicode letters with the sequence \pL. See here.

    So your solution would be

    /^[\pL- "\']*$/u
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a regular expression to match filenames which look like this: name -
I have one interesting problem. I must parse mail body (regular expression), get some
I have a problem with regular expressions! How can i count html tags with
I have 4 textboxes which can only take a number. The problem is that
I have a regular expression which will parse the content of a message and
In my Android project I have a regular expression and a string, in which
I have a very basic regular expression that I just can't figure out why
I have the following regular expression in JavaScript which matches strings like 12:23:34:45 and
I have a regular expression which looks like this: ^(+dd)?(?(?<=+dd)((| )(0)(| )| |)|(0))(8|ddd?)[-/ ]?dd(
I have a problem which has an solution that can be solved by iteration,

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.