String.search(pattern : Search : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » Search »

 

String.search(pattern


 
Call search() on a String to find the first occurrence of the pattern you pass it.

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var themTharHills:String = "hillshillshillsGOLDhills";
        trace(themTharHills.search("/gold/i"))//15

    }
  }
}

        



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo String
» Search