Create a global regex to match multiple times in a string : Match : Regular Expressions Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Regular Expressions » Match »

 

Create a global regex to match multiple times in a string


 


package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var example:RegExp = /abc/g;
        
        var result:Array = example.exec"abc abc" );
        traceresult.index );
        traceexample.lastIndex );
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Regular Expressions
» Match