I have a string
$str="NassarWellerGomez-GarciaSanchez-RenedoLoeches-SanchezGomez-GarciaMunoz-FerrerasSanchez-RenedoChiaoHakkarainenWernerValkamaHarounPlett";
I want to match words starting with capitals only like: Nassar Weller Gomez-Garcia etc
I used this :
preg_match('/[A-Z][a-z]+/', $str,$match);
But its not working, help me out here please!