473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Regex to validate letters, spaces and unicode characters

2
Hi,

Could you guys help me to add this pattern: `[\u0000-\u0080]`
into the following regex: `/^[a-zA-Z\ \']+$/` ?

The above regex allows only letters and spaces, and I would like it to additionaly allow text if it has the above unicode pattern also (but its not required).

Regards.
Oct 15 '12 #1

✓ answered by Dormilich

then you would need to extend the character class beyond \u0080.

3 2267
Dormilich
8,658 Expert Mod 8TB
there’s no need to combine the first and the second RegExp. the second is already a part of the first (ASCII).
Oct 15 '12 #2
Scott
2
I dont think so, the
Expand|Select|Wrap|Line Numbers
  1. /^[a-zA-Z\ \']+$/
will pass such words like "Test test" or "test Test", but IT WOULDNT pass special characters (unicode) like "Łądsc Ęsć" .. and I would like to allow that too.
Oct 15 '12 #3
Dormilich
8,658 Expert Mod 8TB
then you would need to extend the character class beyond \u0080.
Oct 16 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Borko | last post by:
hi I am having problems getting unicode characters into VB. Using VB6 (sp3) and Access 2000 Characters are displayed correctly in Access, just when I use ADODB (2.7) to read them in VB i get ?...
7
by: Johannes | last post by:
Is it correct that Unicode characters with code points above 0x10FFFF are not supported by C#? I have a hard time believing this since it would eliminate some Asian languages. If it is true, is...
3
by: Mohammad-Reza | last post by:
We are writing an application for a specific culture(Arabic or Farsi). This application involves using DataAdapter, OLEDB Connection and the DataSet. We didn't use the .NET data binding, just field...
3
by: john | last post by:
I need to produce a RTF-document which is filled with data from a database. I've created a RTF-document in WordPad (a template, so to speak) which contains 'placeholders', for example '<dd01>',...
5
by: Matthew Thompson | last post by:
I have as issue I am finding hard to research. I use a stored proecdure in SQL 2000 to provide search capability for our database of news stories and articles. Being an international magazine...
9
by: R.Kaiser | last post by:
Where can I find which Unicode characters are valid for identifiers in Visual C++ 2005? Thanks Richard
13
by: Kelvin Moss | last post by:
Hi all, How could one write an strstr function to work with unicode characters? Are there existing implementations/solutions/api for doing so? Any pointers would be appreciated. Thanks ..
5
by: Josh | last post by:
Can anyone tell me how do we use Unicode characters in C++ ????
6
by: geegeegeegee | last post by:
Hi All, I have come across a difficult problem to do with extracting UniCode characters from RTF strings. A detailed description of my problem is below, if anyone could help, it would be much...
0
by: M.-A. Lemburg | last post by:
On 2008-07-01 20:31, Peter Bulychev wrote: You could write a codec which translates Unicode into a ASCII lookalike characters, but AFAIK there is no standard for doing this. I guess the best...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.