Solved

Display arabic alphabet with Vb.Net

Posted on 2010-11-28
4
807 Views
Last Modified: 2012-05-10
I'm use this statement to display english alphabet but I want to display arabic alphabet

Dim words As MatchCollection = Regex.Matches(text, "\b[a-zA-Z]+\b")

Open in new window

0
Comment
Question by:ty-exexch-ko
  • 3
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 34225935
I'm confused. You say you are displaying an English alphabet, but you are showing a regex, which would be used to match patterns, or in this case English letters. Are you saying you want to match Arabic characters? If so, you should be able to just paste in the range using charmap (or if you have an Arabic keyboard). You'll probably need to set the RightToLeft option on your regex.

Here is an example--forgive me, I cannot read Arabic, so this may not make sense as I pulled it from the following site:  http://www.shariahprogram.ca/Arabic-alphabet.shtml

Please note the structure of the code (I am including an image in case EE doesn't display the characters properly). It also seems that word boundary has an issue with Arabic script. I may be doing something incorrectly though. You'll have to experiment with that part of the pattern.
string text = "¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿¿";
MatchCollection words = Regex.Matches(text, "[¿-¿]+");

Open in new window

Untitled.png
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 34225944
Note:  Instead of pasting in the characters, you can also denote Arabic characters in your pattern by specifying their unicode values:
MatchCollection words = Regex.Matches(text, "[\u0600-\u06FF]+");

Open in new window

0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 34225949
The VB version:
Dim text As String = "¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿¿"
Dim words As MatchCollection = Regex.Matches(text, "[¿-¿]+")

Open in new window

0
 

Author Comment

by:ty-exexch-ko
ID: 34227259
I will test this code and return back.
0

Featured Post

How our DevOps Team Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

825 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