split() method can be called using a RegExp object instead of a string as the delimiter : Split : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » Split »

 

split() method can be called using a RegExp object instead of a string as the delimiter


 

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

        var reCase:RegExp = new RegExp("[ ,]""ig");
        var sVal = new String("ActionScript Bible, Flash Bible");
        var aVals:Array = sVal.split(reCase);
        trace(aVals);
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo String
» Split