URL patterns#

The select() method uses an “URL pattern” to match nodes by their path. URL patterns match the structure of a path instead of the individual components. They support two match patterns which work as following:

  • * matches a path leaf: /foo/* will match /foo/bar, but not /foo/bar/baz, as /foo/bar/baz is not directly below /foo/

  • ** matches anything recursively: /foo/** will match any path starting with /foo/, for example /foo/bar/baz

Partial strings are not matched, i.e. /foo* or /f*o are invalid URL patterns. ? is also not supported for URL patterns.

Warning

The URL pattern syntax is not the same as the template path pattern syntax (see Templates.) Template path patterns use string matching with no knowledge of path structures.