Given a fairly simple regex, I'd like to match a text between to delimiters:
___MANUAL_TICKET___
###_CLIENT_START_###
TEST
###_CLIENT_END_###
###_PROBLEM_START_###
TEST2
###_PROBLEM_END_###
###_EMAIL_START_###
xyz@test.com
###_EMAIL_END_###
To get the client
I am using this regex:
###_CLIENT_START_###\s(.*?)\s###_CLIENT_END_###
which works as seen HERE.
But when I use it in my PHP Code it does not find any matches:
preg_match('@###_CLIENT_START_###\s(.*?)\s###_CLIENT_END_###@', $source, $matches);
(tried different regex delimiter such as /
and ~
, same result)
What am I doing wrong?