Independent Project.Matching.Match Syntax

Basics:

Wrap sub-matches in %% example:

%emails% from %date%

This will look for " from " in the query, assign what is left of " from " to a variable emails , and what is right of " from " to a variable date and then call the function defined for that rule, or return the data.

Also, in order to differentiate types of the same name, you can optionally put a : and then the name of a variable you would like it mapped to. For example:

%number:x% + %number:y%

return vars.x + vars.y

Still might consider removing the vars variable and mapping the values directly into the environment:

return x + y

this would only cause an issue if you wanted use a name for a variable that is also a keyword. At this point, thats a pretty minor thing... I'll leave this with a vars table for now. If it gets tedious later, I can change it.


Old Problems:

what about a match like this:

'%number% + %number%'

what are the vars going to be mapped to in this case when the type number occurs more than once. There are a couple possible solutions I see at this point: