1 Reply Latest reply on Feb 10, 2010 7:37 AM by ahess24

    Regular Expressions - Extended ASCII

    ahess24

      I'm trying to run a String replace function that replaces any non-word characters but excluding extended ascii and I can't get it to work.  I can't even get an expression to replace just extended ascii.

       

      Ex.

       

      var tempStr:String = "aeioun_âéïúñ";
      trace(tempStr);                                             -- output: aeioun_âéïúñ
      trace(tempStr.replace(/[\x61-\x7A]/g, "X"));     -- output: XXXXXX_âéïúñ
      trace(tempStr.replace(/[\x80-\xA8]/g, "X"));     -- output: aeioun_âéïúñ     -- expected output: aeioun_XXXXX

       

      Documentation says you can do this (http://livedocs.adobe.com/flex/3/html/index.html).

       

      Is this a bug or is it just me.

       

      TIA