<data android:pathPattern="/user/*/settings" /> Matches /user/john/settings but /user//settings . 3. URL Encoding Matters If your actual URL contains encoded characters (e.g., %20 for space), PathPattern matches against the decoded path. So if you expect a space, match it as a literal space, not %20 . 4. No Regex Character Classes You cannot use [0-9] , \d , + , ? , etc. The pattern language is intentionally minimal. 5. Query Parameters and Fragments are Ignored PathPattern only looks at the path portion of the URL. Query parameters ( ?key=value ) and fragments ( #section ) are not considered.

Wait — that’s confusing. Let's clarify.

If you’ve worked with intent filters, you’ve likely seen the path , pathPrefix , and pathPattern attributes inside a <data> tag. While path and pathPrefix are straightforward, pathPattern introduces a mini-language of wildcards that gives you flexible, powerful matching—but it also comes with a few hidden traps.

| Symbol | Meaning | |--------|---------| | * | Matches zero or more occurrences of the preceding character (but be careful – see below). | | .* | Matches any sequence of characters, including an empty sequence. |

Example: