Re: UnknownPlug Errors..

From John R. McPherson
DateFri, 08 Feb 2002 14:30:10 +1300
Subject Re: UnknownPlug Errors..
In-Reply-To (C08FFFF817C9D2118C7C00A0C9ED115501569A2F-EXCHANGE)
Jared Potter wrote:

> plugin UnknownPlug -process_exp "*.eps" -assoc_field "epsses"

and

> mdcmc@scrollkeeper:/usr/local/gsdl/collect/agency/import$ import.pl agency
> Uncaught exception from user code:
> Quantifier follows nothing before HERE mark in regex m/* << HERE
> .eps/ at /usr/local/gsdl/perllib/plugins/UnknownPlug.pm line 149.

Hi,
the problem here is that the pattern you have provided is not
valid - the plugins require perl regular expressions, not DOS-style
wildcards.

In perl regexps, a "." matches any character, and a "*" means 0 or
more matches of the previous term. If you really want a "." you
have to escape it with "".

So, what you want is:
plugin UnknownPlug -process_exp ".*.eps" -assoc_field
"epsses"
to say "match a filename with anything followed by .eps"


John.

PS you can also say ".*.eps$" to say only match at the end of the
filename, rather than anywhere in it.