Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display arabic alphabet with Vb.Net

Posted on 2010-11-28
4
Medium Priority
?
839 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

704 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