Skip navigation
Currently Being Moderated

RegExp Syntax

Oct 18, 2012 12:53 PM

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?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points