Book a Demo

Author Topic: code engineering Actionscript 3: parser block  (Read 3031 times)

maddec

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
code engineering Actionscript 3: parser block
« on: December 10, 2009, 05:08:58 am »
Hi there,

When I import an as3 class containing a RegExp literal:

var pattern2:RegExp = /test-\d/i;

the parser block and report an error: There was an error parsing ../MyClass.as on line 77.  Unexpected symbol: /      

I know that I could use the new operator instead:  
var pattern1:RegExp = new RegExp("test-\\d", "i");

But in some cases this is really boring/impossible to modify this in eahc class manually.

Thank you in advanceto fix this problem.

Best regards.

maddec