0 Replies Latest reply on Aug 5, 2011 3:52 PM by Codeflayer

    Flex Regex Help

    Codeflayer

      Hi there,

       

      I have a regular expression that is used to validate names in my application. It's intended to only allow alphanumeric names and spaces. My trouble started when I tried to modify it to also accept other unicode characters (umlauts and whatnot) On the java side of my app the following regex works great:

       

      "^(\\p{L}+\\p{M}*|\\d+)+\\s*((\\s+\\p{L}+\\p{M}*)*|(\\s+\\d+))*$"

       

      But due to, I'm guessing, lack of support for \p in AS3's regex engine this doesn't work. Does anyone know how to modify this regular expression to allow flex to recognize valid unicode characters?

       

      Here's one that I also thought would work but didn't maybe this will be helpful as a starting point.

       

      "^(\\w+|\\d+|[\\x00-\\x80]+)+\\s*((\\s+\\w+)*|(\\s+\\d+)|(\\s+[\\x00-\\x80]+)*)*$"

       

      Thanks in advance for any help.