import re

def check_char(string):
    if not string:
        return False
    pattern = r'^(.).*\1$|^.$'
    return bool(re.match(pattern, string))