code: public static Version parseVersion( String rawVersion ) {
  
  		Version result = null;
  		Matcher m = Pattern.compile( "^(\\d+)\\.(\\d+)(\\.\\d+)?([.-].+)?$" ).matcher( rawVersion );
  		if( m.find()) {
  			result = new Version(
  					Integer.parseInt( m.group( 1 )),
  					Integer.parseInt( m.group( 2 )),
  					m.group( 3 ) == null ? 0 : Integer.parseInt( m.group( 3 ).substring( 1 )),
  					m.group( 4 ) == null ? null : m.group( 4 ).substring( 1 ));
  		}
  
  		return result;
  	}
docs: Creates a version object from a string.
  @param rawVersion a version as a string
  @return null if the version is invalid, or an object otherwise