I actually know what the regular expression was suppose to do. I fix the
problem by replacing
s{(?<!\\)#.+$}{};
with
s{(?!\\)#.+$}{};
I am just afraid it might not be the best solution. I am assuming the
application "die" cause I get
"
Software error:
....
Conf.pm: Sequence (?<...) not recognized at Conf.pm line 170
....
BEGIN failed--compilation aborted at order.cgi line 40.
"
Here is my server info:
Perl Version: 5.00404
SERVER_SOFTWARE = Apache/1.3.19 (Unix) PHP/4.0.4pl1
--Kit
> On Thursday 26 July 2001 19:19, Kit wrote:
>> Everything seems to be working fine except for this error.
>> Conf.pm: Sequence (?<...) not recognized at Conf.pm line 170.
>
> I'm unable to duplicate this error. Does the application "die" with
> this error on your system? What OS and version of perl are you using?
>
> It tested OK on perl 5.005x and 5.6.1...
>
>> Okay, my knowledge of regular expression is not so great, but
>> shouldn't it be:
>>
>> s{(?!\\)#.+$}{};
>> Instead of
>> s{(?<!\\)#.+$}{};
>
> The logic is:
>
> remove any comments not preceded by \
>
> ex.
>
> foo = bar # remove this
> foo = \#FFFFFF # remove this comment, but not the color code
>
>> From perlre:
>
> "If you are looking for a "bar" that isn't preceded by a "foo",
> /(?!foo)bar/ will not do what you want."
>
> and...
>
> "(?<!pattern)
> A zero-width negative lookbehind assertion. For
> example /(?<!bar)foo/ matches any occurrence of
> "foo" that isn't following "bar".
>
> Any additional info would be most helpful...
>
> -Regards,
> Paul Sisson
>
>