View Single Post
08-05-09, 06:23 PM   #5
Vaest
A Murloc Raider
Join Date: Oct 2008
Posts: 7
I imagine that the following versioning systems cover 95%+ of addons
  • (major).(minor).(etc).(etc)
    /(\d+)\.(\d+)\.(\d+)\.(\d+)/ (only does 4 numbers, i forget the syntax for repeated subpatterns.) Then just compare match 1 on both strings, match 2 on both strings, etc
  • r(revision number) (subversion, etc)
    /r\d+/ would match a revision number
  • and some kind of date string, 20090805 or such
    If they use a standard version date string (YYYYMMDD) it could be treated the same as a revision, the greater the number, the newer it is. Other date formats are also trivial with regex.

the only other concerns are words like "stable", "beta (or b)", release, etc. which i can't imagine are hard either.
  Reply With Quote