def is_unit(char):
    """
    Verifies whether the character given is a "unit" (meaning it is a regex
    command (by opposition to an operator)).
    """
    assert len(char) == 1
    return char.isalpha() or char.isnumeric() or char in ['.', ' ', '-']