Skip to content

Commit

Permalink
keto: Clarify glob matchin pattern (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Nov 14, 2019
1 parent ad64ae6 commit fa9fd9b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/keto/engines/acp-ory.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fa9fd9b

Please sign in to comment.