I need to match the quality of a film and order them. The value can be found in the title
Ex. "The Wolf of Wall Street (2014) (HD, 1080p).mov"
I have a regex that matches the quality:
"\\d\\d\\d[\\d]*p"
For some reason when i compare (compareTo) the values they are ordered:
Ex.
1080p
1080p
480p
480p
480p
720p
720p
480p lists higher than 720p. I believe that this happens because of the p(?). I wonder how I can change my regex to check that there is a p (so the year in the title isn't matched, only the quality) but excludes the p in the matched string.