I don't know of any existing converter, but if your target is specifically ActionScript and not just any ECMA-262 implementation, the job could be easier than you expected. AS3 is powered by PCRE, same as PHP's preg_ functions, so it supports lookbehind, atomic groups and possessive quantifiers, same as Java. It also supports Java's dotall and extended modes in addition to JS's ignore-case and multiline. It supports the inline modifier syntax ((?imsx)) as well.
PCRE's Unicode support is better than Java's, but unfortunately, I don't think that's included in ActionScript. The Unicode functionality seems to be explicitly tied to the character encoding, which is UTF-8 in PCRE; I believe ActionScript uses UTF-16 in accordance with ECMA-262. Anyway, its Unicode support seems to be minimal, same as JavaScript's.
Here is a breakdown:
java.util.regex RegExp.prototype Character class set operations (?#…) comment patterns Named capture The /y (sticky) modifier The /x (extended) modifier \u10000+ Codepoints Possessive quantifiers Quotation Exception Handling Linebreak matcher
References
- ECMAScript RegExp bugs
- What the JavaScript RegExp API Got Wrong, & How to Fix It
- Non-Participating Groups: A Cross-Browser Mess
- ECMAScript 3 Regular Expressions are Defective by Design
- XRegExp: An Extended JavaScript Regex Constructor
- Regex Recursion (Matching Nested Constructs)
- Remove Nested Patterns with One Line of JavaScript
- Validate Phone Numbers: A Detailed Guide
- java.util.regex.Matcher
- java.util.regex.Pattern