Thanks Alex, That was it... I was confused, there is no need to escape the code point backslash ( only on char classes ).
On 10/14/07, Alex Harui <[EMAIL PROTECTED]> wrote: > > Sorry, you have too many '\". It should be \u0041 If you have two of > them they become the backslash. > > > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Alex Harui > *Sent:* Sunday, October 14, 2007 12:05 AM > *To:* flexcoders@yahoogroups.com > *Subject:* RE: [flexcoders] Re: Flash Player 9 BUG?? Regex and Unicode > > > > I don't think it sees \u0041 as a Unicode character in the string > definition. > > > ------------------------------ > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Aldo Bucchi > *Sent:* Saturday, October 13, 2007 8:37 PM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Re: Flash Player 9 BUG?? Regex and Unicode > > > > Sorry, forgot some info > > Flex 3 Beta 2 > > > > On 10/13/07, *Aldo Bucchi* <[EMAIL PROTECTED]> wrote: > > Hi all, > > I think I just found a bug in my player ( 9,0,60,235 debug ) > > ------------------------ > > // we will do some searches over the following string > var str:String = "lalalALAlalalA"; > > // first regexp is declared using forward slashes ( Unicode 0041 == > LATIN CAPITAL 'A' ) > var regex1:RegExp = /\u0041/g; > > // second is equivalent, but declared using the constructor ( note > that the backslash is now escaped ) > var regex2:RegExp = new RegExp( "\\u0041","g" ); > > > // OK: outputs A,A,A > trace ( str.match( regex1 ).join("," ) ); > > // ERROR: outputs nothing!!! > trace ( str.match( regex2 ).join("," ) ); > > ---------------------------- > > Am I missing something?? > > Thanks, > Aldo > > -- > :::: Aldo Bucchi :::: > +1 858 539 6986 > +56 9 8429 8300 > +56 9 7623 8653 > skype:aldo.bucchi > > > > > -- > :::: Aldo Bucchi :::: > +1 858 539 6986 > +56 9 8429 8300 > +56 9 7623 8653 > skype:aldo.bucchi > > > -- :::: Aldo Bucchi :::: +1 858 539 6986 +56 9 8429 8300 +56 9 7623 8653 skype:aldo.bucchi