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."; trace( sentence.search( regex ) ); trace( regex.lastIndex ); trace( sentence.search( regex ) ); regex.lastIndex = 13; trace( sentence.search( regex ) ); trace( regex.lastIndex ); } } }