0

I want to find all files with certain extension in certain path. Example:

Pattern p = Pattern.compile("/Users/*/*\\.png");
Matcher m = p.matcher("/Users/me/failed.png");
m.find()

this should result in true, however its false, so i tried to be more specific:

Pattern p = Pattern.compile("/Users/*/[a-z]*\\.png");
Matcher m = p.matcher("/Users/me/failed.png");
m.find()

However everything is false, but the regexp should match the given input. Why is this resulting in false? Is there something about regexp i have missed? Thanks for help!

Johnyb
  • 980
  • 1
  • 12
  • 27

0 Answers0