def reset_selective(self, regex=None):
    'Clear selective variables from internal namespaces based on a\n        specified regular expression.\n\n        Parameters\n        ----------\n        regex : string or compiled pattern, optional\n            A regular expression pattern that will be used in searching\n            variable names in the users namespaces.\n        '
    if (regex is not None):
        try:
            m = re.compile(regex)
        except TypeError as e:
            raise TypeError('regex must be a string or compiled pattern') from e
        for ns in self.all_ns_refs:
            for var in ns:
                if m.search(var):
                    del ns[var]
Clear selective variables from internal namespaces based on a
specified regular expression.

Parameters
----------
regex : string or compiled pattern, optional
    A regular expression pattern that will be used in searching
    variable names in the users namespaces.
def reset_selective(self, regex=None):
    'Clear selective variables from internal namespaces based on a\n        specified regular expression.\n\n        Parameters\n        ----------\n        regex : string or compiled pattern, optional\n            A regular expression pattern that will be used in searching\n            variable names in the users namespaces.\n        '
    if (regex is not None):
        try:
            m = re.compile(regex)
        except TypeError as e:
            raise TypeError('regex must be a string or compiled pattern') from e
        for ns in self.all_ns_refs:
            for var in ns:
                if m.search(var):
                    del ns[var]