Force the last index to be past the first matching position : Match : Regular Expressions Flash / Flex / ActionScript examples


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

 

Force the last index to be past the first matching position


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){
        var regex:RegExp = /b[a-z]{3}b/g;
        var sentence:String = "This string has two three letter words.";
        
        tracesentence.searchregex ) );
        traceregex.lastIndex );
        tracesentence.searchregex ) );
        regex.lastIndex = 13;
        tracesentence.searchregex ) );
        traceregex.lastIndex );

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Regular Expressions
» Match