I want to search the contents of a variable for the characters {{ and read what follows into another variable until }} is encountered, then stop reading. How would I do this? Thanks for any help!
I usually need to test my poor regex to confirm, but you could try:
$subject = 'hello {{hmm... I like this, yeah!}} world!'; $matches = array(); preg_match('/\{\{(.*)\}\}/', $subject, $matches); //now $matches[1] should contain the info
Thanks a ton!! 😃