diff --git a/docs/keto/engines/acp-ory.md b/docs/keto/engines/acp-ory.md index 16a17cd1e..77f5f8474 100644 --- a/docs/keto/engines/acp-ory.md +++ b/docs/keto/engines/acp-ory.md @@ -113,6 +113,37 @@ is: `cat` nor `bat`. - **alternatives list:** `{cat,bat,[mt]at}` matches `cat`, `bat`, `mat`, `tat` and nothing else. +- **backslash:** `foo\\bar` matches `foo\bar` and nothing else. `foo\bar` matches + `foobar` and nothing else. `foo\*bar` matches `foo*bar` and nothing else. Please note + that when using JSON you need to double escape backslashes: `foo\\bar` + becomes `{"...": "foo\\\\bar"}`. + +The pattern syntax is: + +``` + pattern: + { term } + + term: + `*` matches any sequence of non-separator characters + `**` matches any sequence of characters + `?` matches any single non-separator character + `[` [ `!` ] { character-range } `]` + character class (must be non-empty) + `{` pattern-list `}` + pattern alternatives + c matches character c (c != `*`, `**`, `?`, `\`, `[`, `{`, `}`) + `\` c matches character c + + character-range: + c matches character c (c != `\\`, `-`, `]`) + `\` c matches character c + lo `-` hi matches character c for lo <= c <= hi + + pattern-list: + pattern { `,` pattern } + comma-separated (without spaces) patterns +``` ### Regular Expressions