Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Help/markdown/_xWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Match anything.  _xWILD is an unrestricted wildcard. Key-value pairs may add re

With a match or fail list, _xWILD becomes an "OR" matching function.

An unrestricted _xWILD covers nodes up to the first node that the elements after it can match. Matching never backs up to try a longer stretch, so a wildcard stops at the first possible place.

When an optional element follows the wildcard, the wildcard also stops at the first node that a later element matches, up to and including the next required element. In that case the optional element is absent. In

```
_xNIL <- the _xWILD _xWILD [opt match=(three)] _xWILD [one match=(bears)] @@
```

on "the big bears met three bears", the wildcard covers only "big" and "three" is absent, so the rule matches "the big bears". When the optional element and a later one both match the same node, the optional element is used. Before engine 4.2.27 the wildcard ran past the first "bears" to reach "three". Here the rule then failed, because "three" is followed by a space, not "bears". To stop the wildcard, a rule had to repeat the later elements in a fail list, as in `_xWILD [fail=(three bears)]`.

**NEW 4.2.27**

## Example

```
Expand Down
Loading