I'm not crazy about your choice of pattern here... I'd prefer to see:
If either argument is omitted it is unbounded.
With the way you have it now it can be confusing to do something like:
Code: Select all
+/sizemax:0>FF0000,
+/sizemin:10>00FF00,
+/sizemin:1;/sizemax:9>0000FF,
Because in the last pattern they are OR-ed thus the order of the filters becomes extremely important.
You also made this impossible:
Code: Select all
+/sizemax:0>FF0000,
+/sizemin:10>00FF00,
+/sizemin:5;/sizemax:9>00FFFF,
+/sizemin:1;/sizemax:4>0000FF,
as well as finding a file of an exact size:
Where my suggestion would make it:
Code: Select all
+/size::0>FF0000,
+/size:10:>00FF00,
+/size:5:9>00FFFF,
+/size:1:4>0000FF,
+/size:42:42>101010,
And it removes the dependence on the sort order so I can define them in a more sensible manner:
Code: Select all
+/size::0>FF0000,
+/size:1:4>0000FF,
+/size:5:9>00FFFF,
+/size:10:>00FF00,
+/size:42:42>101010,
Further, not that it's a big difference but you'd only have to document one pattern instead of two plus a note on the importance of ordering.
