I have a string with text and french zip code and french city.
$str="lore ipsum facto lore ipsum 75000 Paris";
I would like to extract : "75000 Paris"
I know how to extract the zip code :
preg_match('/(\d{5})/',$str, $matches);
But I don't know how to add also the city after. An idea to help me ?
Thank you !
/(\d{5}).+/should do it, infact you don't need the brackets: \d{5}.+\