0 Replies Latest reply: Oct 18, 2012 12:53 PM by TOverturf RSS

    RegExp Syntax

    TOverturf Community Member

      Hello, I need some help with AS3 RegExp Syntax.

       

      I have the RegExp in Javascript and it works fine:

       

      <html>  

      <body>    

      <script language=javascript>      

       

      var txt='<html><optionvalue="50288"selected="selected">0445751446</option></html>';       

       

      var re1='.*?';     

      var re2='(".*?")'       

      var p = new RegExp(re1+re2,["i"]);      

      var m = p.exec(txt);      

      if (m != null)      

      {

           var string1=m[1];          

           document.write("("+string1.replace(/</,"&lt;")+")"+"\n");      

      }

       

      </script>

      </body>

      </html>

      I am essentially extracing "50288". Any tips on "converting" this to AS3?