thanks for the insight there Juan :)

Chat Skype: mattmuller MSN: matt_b_mul...@hotmail.com
Contact Me [image: Linkedin] <http://www.linkedin.com/in/mattmuller>[image:
Facebook] <http://www.facebook.com/matthewmuller>[image:
Twitter]<http://twitter.com/mattmuller>


On Tue, Oct 20, 2009 at 3:57 AM, Juan Pablo Califano <
califa010.flashcod...@gmail.com> wrote:

> Hi
> I don't think the regex is wrong. In fact, if you change uFFFF for a
> smaller
> number, it works fine.
>
> I have not tested each code point, mind you, but with a few tries, the
> highest max range that works that I could find is 0xFEFF.
>
> The range 0xFF00 - 0xFFFF apparently is reserved for control stuff. So
> 0xFEFF is the last value before that range. Not sure if the way the regex
> behaves is a bug or a feature, really, but you can probably get by with
> something like this:
>
> var testIsArabic:Boolean = /[\u0627-\ufeff]/.test(str.charAt(0));
>
> Cheers
> Juan Pablo Califano
>
> 2009/10/19 Matt Muller <matthewmul...@gmail.com>
>
> > Hi there,
> >
> > issue with regex when trying to test if a char is within a unicode range
> >
> > var testIsArabic:Boolean = /\u0627/.test(str.charAt(0)); // this works
> > testing for arabic chars of unicode 0627
> >
> > var testIsArabic:Boolean = /[\u0627-\uFFFF]/.test(str.charAt(0)); ////
> this
> > range does not work, returns false
> >
> > NOTE: the str.charAt(0) is 0627
> >
> > any ideas?
> >
> > cheers,
> >
> > MaTT
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to