import re


def detect_arxiv(txt):
    """
    Extract an arXiv ID from text data
    """
    regex = r'arXiv:[0-9]{4,4}\.[0-9]{5,5}(v[0-9]+)?'
    m = re.search(regex, txt)
    if m is not None:
        return m.group(0)
    else:
        return None