def _capitalize_first_letter(word):
    """Return a regex pattern with the first letter.

    Accepts both lowercase and uppercase.
    """
    if word[0].isalpha():
        if word[0].isupper():
            return '[' + word[0].swapcase() + word[0] + ']' + word[1:]
        else:
            return '[' + word[0] + word[0].swapcase() + ']' + word[1:]
    return word
