Destramic Posted May 30, 2011 Share Posted May 30, 2011 hey guys im wanting to search a string and return a 1 - many results string = "controller/action/:game/:parameter" now in this instance i want to extract game and parameter but the string could consist of anything but i only want the values that look like :this :test :game :whatever i hope someone can help please....thanks Link to comment https://forums.phpfreaks.com/topic/237920-extracting-from-a-pattern-help/ Share on other sites More sharing options...
requinix Posted May 30, 2011 Share Posted May 30, 2011 Try preg_match_all and '/(?\w+/' Link to comment https://forums.phpfreaks.com/topic/237920-extracting-from-a-pattern-help/#findComment-1222599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.