[alicebot-archcomm] Conditional wildcards

Gary Dubuque alicebot-archcomm@list.alicebot.org
Fri, 28 Feb 2003 10:55:30 -0800


I know the discussion of using things like regular expressions has been
tried already.  The problem it solves is a necessary one.

What about wildcards that match in the pattern and then perform a second
level of analysis before the whole graphmaster process is completed?  Say a
wildcard that has the conditional of a date is in a pattern.  While matching
the pattern, the date is assumed as a special wildcard match that saves the
position in the input and the conditional part of the wildcard and the input
consumed by the wildcard.  If the whole pattern is matched, then the
conditional is applied to the consumed input.  A success completes the
processing as normal.  A failure resumes the graphmaster as if the pattern
failed in the first place at the spot where the conditional wildcard was
saved.

This gives the same speed of the regular graphmaster, but also allows the
dates, currency, phone numbers, urls, etc. to be properly placed in
wildcards.

I have no format for conditional wildcards except that they should start
like regular wildcards...  Maybe something like "*{##/##/##}".