nhsal69 Posted May 13, 2010 Share Posted May 13, 2010 Hi all, I'm trying to search a string for some values.. These values all vary, but they are contained within a set format. So I'm need to know how, for a $string_data = strpos($table, "known start point" unknown bit "known end point"); Do you know how I should form this statement to get the Start, unknown and end all in the variable. Thanks Link to comment https://forums.phpfreaks.com/topic/201603-search-string-for-start-and-end-points/ Share on other sites More sharing options...
phpchamps Posted May 13, 2010 Share Posted May 13, 2010 $pattern = "/^atul(.*)singh$/i"; $text = "Atul kumar singh"; if(preg_match($pattern, $text)){ echo "Matched"; }else{ echo "Not Matched"; } Link to comment https://forums.phpfreaks.com/topic/201603-search-string-for-start-and-end-points/#findComment-1057632 Share on other sites More sharing options...
nhsal69 Posted May 13, 2010 Author Share Posted May 13, 2010 Ahhh, thanks v. much.... Link to comment https://forums.phpfreaks.com/topic/201603-search-string-for-start-and-end-points/#findComment-1057640 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.