patterndb single byte optional
Hello, I was wondering if there's any way of reducing two lines of pattern, which provide a way of matching when a optional byte is present or not, into a single line. Example: JAN @STRING:.day@ 2011 JAN @STRING:.day@ 2011 Notice that this is the case when day doesn't have the leading 0 and I don't want the .day to contain any space. Just asking, this would reduce my patterns to half :) but I can live with that... Maybe a new type of STRING, like @DSTRING:.day: @ (dirty string, with dirty chars inside the optional argument) would fix it? Thanks for your time. Jean-François Mousinho
On Tue, 2011-02-15 at 09:34 +0000, Jean F. Mousinho wrote:
JAN @STRING:.day@ 2011 JAN @STRING:.day@ 2011
Notice that this is the case when day doesn't have the leading 0 and I don't want the .day to contain any space.
Completely untested, but wouldn't this work: JAN@ESTRING:: @@ESTRING:: @@STRING:.day@ 2011 Assuming ESTRING can catch an empty string, this should work. -- |8]
participants (2)
-
Gergely Nagy
-
Jean F. Mousinho