package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var example:RegExp = /abc/; var result:Array = example.exec( "A string with abc in it" ); trace( result ); trace( result.index ); result = example.exec( "A string with no match" ); trace( result ); } } }