Re: Strange warning: preg_match compilation warning
| From: | Daniel Brown | Date: | Mon, 05 Nov 2007 17:08:25 +0000 |
| Subject: | Re: Strange warning: preg_match compilation warning | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264062@lists.php.net to get a copy of this message | ||
On 11/5/07, Paul Scott <pscott@uwc.ac.za> wrote:
>
> Does anyone have any idea as to why the following line is generating a
> warning?
>
> } else if (preg_match('/^([0-9]{4})-([0-9]{4})? (AVOIR \)$/', $content)
> === 0) {
>
> The warning text is as follows:
>
> Warning: preg_match(): Compilation failed: missing ) at offset 34 in ...
>
> Offset 34 seems to be the opening parenthesis of the preg_match function
> call...(??)
>
> Any help would be appreciated, googling simply brings up a load of
> busted websites...
>
> --Paul
> --
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>
>
> All Email originating from UWC is covered by disclaimer
>
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
You canceled-out the final closing param with a backslash here:
(AVOIR \)
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
Give a man a fish, he'll eat for a day. Then you'll find out he was
allergic and is hospitalized. See? No good deed goes unpunished....