package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var reCase:RegExp = new RegExp("\\s(\\w)+\\s", "g"); var sValue:String = new String("abc def ghi"); trace(sValue.search(reCase)); // 3 } } }