Searching : search « String « Flash / Flex / ActionScript






Searching

 

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

    }
  }
}

        








Related examples in the same category

1.String.search(pattern:*):int