-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: mail2dolly
Message 6 in Discussion

 Hi Raj,   Thank you very much for the reply. So I believe there are two ways of 
handling this :   1. Use unicode ranges, This will work fine for Indic languages. eg 
For Devanagri ,   
Regex regex = new Regex(@"[\u0900-\u097F]");
String ?????? = "????????????Bad"; 
This will give only the hindi letters on doing a match and it would filter out the 
tamil and english. 
2.  To use Regex regex = new Regex(@"[\p{L}]"); 
This would validate tamil , english and hindi alphabets in the string above.  
I was wondering if there is some switch with \p or some other regex option that 
decides the unicode range without me specifying it explicitly depending on what my 
UICulture is set to. 
After I say CultureInfo ci = new CultureInfo("ta-IN",true); 
When I try to do a word match , it should validated strings based on my locale chosen. 
That way I don't hard code all the unicode ranges, I just write a generic regex, and 
decide my CultureInfo dynamically. Like in the above case, it should filter all 
non-Tamil characters. 
I also noticed that characters in hindi (must be the case with all caseless languages) 
dont match a \p{Ll} or \p{Lu} but only a \p{L}. I dont understand Unicode groups and 
block ranges well, am looking out for a more detailed (and understandable) 
documentation . 
Thanks for the info again. 
Regards,
Dolly 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to