I am having the input string of
Aspen,Colorado-USA
I want to split it by using preg-split
I want this output:
Array ( [0] => Aspen [1] => Colorado [2] => USA )
I have used like this
$input=Aspen,Colorado-USA;
$out=preg_split( "%[^a-zA-Z\s]%",$input);
is it correct? I want to know efficient way to do this.