def parse_revision_id(message):

    match = re.search('^Differential Revision:.*/D(\d+)$', message, re.MULTILINE)
    return int(match.group(1)) if match else None
Parse the revision id out of a commit message
dataset/ETHPy150Open dropbox/changes/changes/listeners/phabricator_listener.py/parse_revision_id