@staticmethod
def _is_end_regex(word):
    """Returns `True` if `word` is the end of a regex."""
    return word.endswith('/') or word.endswith('/g') or word.endswith('/i'
        ) or word.endswith('/ig') or word.endswith('/gi')
