Mega Code Archive

 
Categories / Flash ActionScript / String
 

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     }   } }