On Wed, 2005-03-23 at 09:22 -0600, Mike Reinehr wrote:
> On Tuesday 22 March 2005 07:41 pm, David Fuchs wrote:
> > 22-Mar 17:26 davidfuchs-dir: ERROR TERMINATION at inc_conf.c:495
> > Config error: Regex compile error. ERR=repetition-operator operand invalid
> >
> >             : line 119, col 35 of file
> > /usr/local/bacula/etc/bacula-dir.conf RegexFile = "^.?*$"
> >

I believe that the problem with this is that this directive is telling
the regex engine two conflicting things regarding the number of times a
character is to be matched.

The '^' symbol is an anchor directive (means (in this context): only
match the following pattern if it starts at the begining of a line)
The '.' symbol is a pattern directive (means: match any character)
The '?' symbol is a repetition directive (means: match the preceding
pattern 0 or 1 times).
The '*' symbol is also a repetition directive (means: match the
preceding pattern any number of times, including 0 times)
The '$' symbol is another anchor directive (means: match the preceding
pattern only if it stops end of a line)

when the regex parser gets to the ?* portion of the regex, it thinks
that it is being told to match a  "0 or 1 times" any number of times,
which doesnt make sense.

You could instead, say "^(.?)*$" which (due to the parentheses) tells
the '*' directive to relate to the whole '.?' pattern rather than the
'?' directive. All this being said, this pattern is a bit redundant.

> > So I changed the regex to
> >
> >     RegexFile = "^.*$"

This makes more sense anyway, in regex terms.

It seems like that should have done the trick, but you could always
simplify it even further to ".*" just to make sure, since you are trying
to match everything passed to it, correct?

-davidc

--
If you judge, investigate. -Seneca



-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to