def _real_dollar(s, m):
    """$ Matches the end of the string or just before the newline at the end of the string"""
    if m:
        length_1 = s.__len__()
        length_2 = m.group(0).__len__()
        if length_1 == length_2:
            return True
        else:
            return False
    else:
        return False
