Please consider this string:
$string = 'hello world /foo bar/';
The end result I wish to obtain:
$result1 = 'hello world';
$result2 = 'foo bar';
What I've tried:
preg_match('/\/(.*?)\//', $string, $match);
Trouble is this only return "foo bar" and not "hello world". I can probably strip "/foo bar/" from the original string, but in my real use case that would take additional 2 steps.