I need to match urls ending in /*-u.html
, e.g. https://www.example.com/something/whatever-u.html
.
I've tried android:pathPattern="/.*-u.html"
, which works for the above url, but it doesn't work if there's a hyphen anywhere else in the url, e.g. https://www.example.com/some-thing/whatever-u.html
. At first I thought there was something special about the hyphen character, but then I realised the same happens with any character that follows the .*
.
I've tried many other combinations but can't find one to reliably match the above url format. I know that PatternMatcher is limited, but I assume it should be possible to match this?
Edit: Here's a video of the issue, using the patterns suggested in PraveenSP's answer below.