import re


def verify_and_generate_issueid(issueid):
    """
    Take a Jira issue ID lowercase, or without a '-' and return a valid Jira issue ID.
    Return None if issueid can't be transformed
    """
    matches = []
    regexes = []
    regexes.append(r'([^\W\d_]+)\-(\d+)')  # e.g.: issue-1234
    regexes.append(r'([^\W\d_]+)(\d+)')    # e.g.: issue1234
    for regex in regexes:
        matches.extend(re.findall(regex, issueid, flags=re.I | re.U))
    if matches:
        for match in set(matches):
            return match[0].upper() + '-' + match[1]
    return None