hi all
pardon me
i have a string = ' the quick brown fox http://global.com/file/helloworld.html'; and findstring = 'file/helloworld.html';
now when i search findstring to string the outcome would be the complete string http://global.com/file/helloworld.html';
is this possible?
and how do i achieve this
tnx in advance
You could use [man]preg_match/man or [man]preg_match_all/man, something like:
preg_match_all('#https?://\S*'.preg_quote($findString, '#').'\b#i', $string, $matches); print_r($matches);