I am trying to preg_match by using preg_quote for my pattern and subject. Problem is that preg_match doesn't seem to match them.
I removed the preg_quote and it matched me just fine. I preg_quote subject and message to see what it's the output and they are exactly the same but preg_match doesn't seem to match them. I need to have the preg_quote for some cases.
$message = "My two great things in life are spaghetti and bolognese Order yours #online from Ammou Pizza in Limassol!
foody.com.cy/ammou-pizza";
if(preg_match('#' . preg_quote("ammou-pizza") . '#', preg_quote($message)))
echo 'here';
I expect the output to be 'here' but the actual output is just the exit code 0.