Create a regular expression that matches three-letter words
package{ import flash.display.Sprite;
public class Main extends Sprite{ public function Main(){ var example:RegExp = /b[a-z]{3}b/g; var target:String = "This string has two three letter words";
var result:Array; while ( ( result = example.exec( target ) ) != null ) { trace( result ); } } } }
Related Scripts with Example Source Code in same category :