(rethinkdb_version_string)
return match.group('rethinkdb_version')
Given a RethinkDB version string, extract the SemVer version.

    Example
    -------
    >>> parse_version('rethinkdb 2.4.0~0bionic (CLANG 6.0.0 (tags/RELEASE_600/final))')
    '2.4.0'
Given a RethinkDB version string, extract the SemVer version.
Given a RethinkDB version string extract the SemVer version .
def parse_version(rethinkdb_version_string):
    # type: (str) -> str
    """
    Given a RethinkDB version string, extract the SemVer version.

    Example
    -------
    >>> parse_version('rethinkdb 2.4.0~0bionic (CLANG 6.0.0 (tags/RELEASE_600/final))')
    '2.4.0'
    """
    match = _RETHINKDB_VERSION_STR_REGEX.match(rethinkdb_version_string)

    if match is None:
        message = 'Version string {!r} did not match pattern {!r}'.format(
            rethinkdb_version_string, _RETHINKDB_VERSION_STR_REGEX
        )
        raise ValueError(message)

    return match.group('rethinkdb_version')
def parse_version ( rethinkdb_version_string ) : # type: (str) -> str match = _RETHINKDB_VERSION_STR_REGEX . match ( rethinkdb_version_string ) if match is None : message = 'Version string {!r} did not match pattern {!r}' . format ( rethinkdb_version_string , _RETHINKDB_VERSION_STR_REGEX ) raise ValueError ( message ) return match . group ( 'rethinkdb_version' )