Hi all, sorry about the urgent post but I need a solution asap. I have a text file listed below and my preg_match statement is
[php]/TORNADO WARNING FOR:+[=NEW=\w\s’-.]+\b(’.$region.’)\b/[/php]
I also have an array that I loop through with the preg_match
[php] $warnarea = array ‘NIAGARA’ => array(‘s0000076’, ‘s0000691’),
‘NIAGARA FALLS - WELLAND - SOUTHERN NIAGARA REGION’ => array(‘s0000076’),
‘ST. CATHARINES - GRIMSBY - NORTHERN NIAGARA REGION’ => array(‘s0000691’)); [/php]
[code]013
WFCN11 CWTO 250127
TORNADO WARNING
UPDATED BY ENVIRONMENT CANADA
AT 9:27 PM EDT WEDNESDAY 24 AUGUST 2011.
TORNADO WARNING FOR:
ST. CATHARINES - GRIMSBY - NORTHERN NIAGARA REGION[/code]
The text file above…as you can see should only match the one array value ‘ST. CATHARINES - GRIMSBY - NORTHERN NIAGARA REGION’ however it matches that and NIAGARA…this is beucase in the preg_match expression I have it matching a period as well…this is the only thing causing my issue however I have no clue how to fix it. Any help would be greatly appreciated.
Thanks, Dave