Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. string serverVerRegex = @"^([v]?+\d+\.)(\d+\.)(\d+[a-z]?)(\.[a-z]+)?$";
  2. // ( 1st group)( 2nd )( 3rd )( 4th )
  3. //1st group - MAJOR version. Can have letter "v" or not, and any number of digits -- "v22." and "22." both valid
  4. //2nd group - MINOR version. Can have any number of digits -- ".22." is valid
  5. //3rd group - PATCH version. Can have any number of digits, and one letter or none -- ".22" and ".22b" both valid
  6. //4th group - TYPE (for ex. beta). May be or not be present, but if present, should have one or more letters -- ".beta" or ""(nothing) both valid
  7. string clientVerRegex = @"^([v]?+\d+\.)(\d+\.)(\d+[a-z]?)(\.[a-z]+)?(\.[a-z]+)$";
  8. // ( 1st group)( 2nd )( 3rd )( 4th ) ( 5th )
  9. //Same as above for groups 1 - 4
  10. //5th group - OS environment. Have to always be present, should have one or more letters -- ".mac" is valid, ""(nothing) is not
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement