Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6969769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:37:24+00:00 2026-05-27T16:37:24+00:00

I see numerous examples of using pathPattern to define an intent-filter for a specific

  • 0

I see numerous examples of using pathPattern to define an intent-filter for a specific file extension/type; for example, pathPattern=".*\\.xyz".

Unfortunately, this does not appear to work properly if the file in question has a period elsewhere in the path; for example “my.filename.xyz”.

Is there a pathPattern syntax that will match both “myfilename.xyz” and “my.filename.xyz”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:37:25+00:00Added an answer on May 27, 2026 at 4:37 pm

    The android team chose an unfortunate way to implement pathPattern. You can take a look at how the pattern matching is implemented in the android.os.PatternMatch class:

    https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/PatternMatcher.java

    We’re used to .* working like it does in a regular expression, where the * match is greedy and will match as many characters as possible. In PatterMatch’s implementation, the match is not greedy. The .* will match as many characters as it can, until it finds a match for the next character in the string.

    Example:

    String: “/mnt/my.file.mytype”
    pathPattern: “.*\\.mytype”

    The “.*” in the pathPattern will match the substring “/mnt/my”, and hence will fail to match the string.

    Given this limitation, I don’t see a way to write a pathPattern that can match any string that ends in “.mytype”. The best you can do is follow Jason’s solution to add additional patterns to match paths with as many dots as you are willing to specify patterns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have numerous index.php scripts using SEO-friendly arg format like example.com/path/to/index.php/opt/arg and would like
I have innoDB table using numerous foreign keys, but we just want to look
Using SQL2k5, I have a staging table that contains columns that will populate numerous
After using a caching plugin to fix numerous hotlinks, some of the generated html
I've seen numerous arguments that using a return value is preferable to out parameters.
I can see numerous websites that have a part of their link hidden. For
I'm using the fairly standard compression code that I've seen floating around numerous places
(see here for the problem I'm trying to solve) How do you get hibernate
See title. By lightweight markup I mean something like markdown or wikitext.
See title: what does it mean for a C++ function to be inline?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.