I have a problem when I need to filter out a “longer” path so that it is not captured by the intent filter .
As indicated in the code below,
PatternMatcher pm = new PatternMatcher("/..*/..*", PatternMatcher.PATTERN_SIMPLE_GLOB); Boolean b = pm.match("/segment/segment"); Boolean c = pm.match("/segment/segment/segment"); AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create(); alertDialog.setTitle("Alert"); alertDialog.setMessage(b.toString() + ',' + c.toString());
As a result, it displays true,true .
Is there a way to make the result true,false ? Changing a regex to /..*/..*/ and url to /segment/segment/ not possible.
Thanks. I appreciate the discussion
source share