'Given a subject, tries to match a major and/or minor version number.
If found, sets the api.major_version and api.minor_version environ
variables.
Returns True if there was a match, false otherwise.
:param subject: The string to check
:param req: Webob.Request object'

def _match_version_string(self, subject, req):

    match = self.version_uri_regex.match(subject)
    if match:
        (major_version, minor_version) = match.groups(0)
        major_version = int(major_version)
        minor_version = int(minor_version)
        req.environ['api.major_version'] = major_version
        req.environ['api.minor_version'] = minor_version
    return (match is not None)
