Over a million developers have joined DZone.

Flex Regex Versus Java Regex + Howto Embed Regex In Flex

// Only allow 6 to 9 digits (and no more)
Flex: ^\d{6,9}$
Java: \\d{6,9}

Following code will NOT function as desired (the {} are interpreted as binding markers, thus not part of the regex):

Following code will function as desired:

   public var regex:String = "^\\d{6,9}$";


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}