I don't think that's very practical. You're better off, IMO, to extract a version number, and compare it to your limit value, external to the regex. Trying to incorporate the comparison inside the regex, isn't very useful, IMO, but it is very hard, if it is even feasable.