Hi,
I'm trying to test if a string matches the word #yesterday (including the pound sign). I am finding if I don't have the pound sign in and the $body equals 'yesterday' works fine. But with the # sign, doesn't.
if( preg_match('/^(#yesterday)$/i', $body) ){
How (I'm stuck in 5.2+ php) can I see if the string is yesterday with the pound sign?
Thanks,
I test the $to number to be sure its an admin phone number, than check the
$body = $_REQUEST['Body']; against those keywords.
Kind of like:
if( preg_match('/^(today)$/i',
send back deals today
} else if if( preg_match('/^(yesterday)$
send back yesterdays deal count
} else {
do whatever
}
Works fine until I add in the # pound sign.
I tried placing the slash but didn't seem to work:
if( preg_match('/^(/#yesterday
just didn't return anything.