I am new to actionscript working on avm2 ..
One thing I want to know is to determine if a given regular expression is compiled or not in the RegExp class, which uses the pcre library internally as a regular expression compiler.
For example, the following has parenthesized-inconsistent regular expression that might not compile in pcre in the RegExp class.
var r:RegExp = new RegExp("(a))");
I tried using try-catch as shown below, there was no exception.
try { var r:RegExp = new RegExp("(a))"); } catch (e:Error) { trace('error'); }
I also tried to find a solution on the Internet, it seems there is no method or properties for it.
Thanks.
source share