Lookup: What is an "exact match"?

Hi,

according to the documentation lookuptables create “a large, case-insensitive regex pattern that looks for exact matches”.

What exactly is defined as an exact match considering the chars before and after the regex? For example in the docs the example lettuce wrap is given and this would match get me a lettuce wrap ASAP as [0 0 0 1 1 0] but what about “get me lettuce wraps ASAP” or “get me a lettuce wrap!” or “Im hungry, I need a …**.**lettuce wrap.”

It doesn’t matter what comes before and after the regex. As long as the char sequence lettuce wrap occurs exactly like this anywhere in the message, it will count as a match. What doesn’t count is something like lettuce or tomato wrap.

The resulting array will have a 1 for any token (i.e. word) that contains a part of the matched regex. So in your examples, for “get me lettuce wraps ASAP” it will be [0 0 1 1 0] and for “Im hungry, I need a …**.**lettuce wrap.” it will be [0 0 0 0 0 1 1].

1 Like