matrix-org / matrix-org/matrix-spec

Add a way to escape glob characters

Open
#2,243 2 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

There is currently no way to match a literal `*` or `?` with a glob pattern without matching other things as well. So it is not possible, for example, to apply a [policy rule](https://spec.matrix.org/v1.16/client-server-api/#mpolicyruleuser) to a user with ID `@*:example.org` without it applying to other users as well.

One possibility would be to allow backslash-escaping.

(This came up in a [discussion on MSC4155](https://github.com/matrix-org/matrix-spec-proposals/pull/4155#discussion_r2492244321))

Contributor guide

Open the contributing guide

Research direction

Start with the Matrix policy rule section linked in the issue and the MSC4155 discussion, then locate the specification's glob-pattern rules. Define the escaping behavior and its interaction with matching, and document the resolved semantics with examples for literal `*` and `?`.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.