

@internationalizeDocstring
def re(self, irc, msg, args, f, text):
    '<regexp> <text>\n\n        If <regexp> is of the form m/regexp/flags, returns the portion of\n        <text> that matches the regexp.  If <regexp> is of the form\n        s/regexp/replacement/flags, returns the result of applying such a\n        regexp to <text>.\n        '
    if (f('') and (len(f(' ')) > (len(f('')) + 1))):
        s = _("You probably don't want to match the empty string.")
        irc.error(s)
    else:
        t = self.registryValue('re.timeout')
        try:
            v = process(text, text, timeout=t, pn=self.name(), cn='re')
            if isinstance(v, list):
                v = format('%L', v)
            irc.reply(v)
        except commands.ProcessTimeoutError as e:
            irc.error(('ProcessTimeoutError: %s' % (e,)))
        except re.error as e:
            irc.error(e.args[0])

dataset/ETHPy150Open ProgVal/Limnoria/plugins/String/plugin.py String.re/VarMisuse@93/234 `f`->`text`