mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Fixed re command.
This commit is contained in:
parent
62c407d694
commit
bd8de87438
@ -80,12 +80,12 @@ class Utilities(callbacks.Privmsg):
|
|||||||
|
|
||||||
Returns all matches to <regexp> (in the form /regexp/flags) in text.
|
Returns all matches to <regexp> (in the form /regexp/flags) in text.
|
||||||
"""
|
"""
|
||||||
(re, text) = privmsgs.getArgs(args, needed=2)
|
(regexp, text) = privmsgs.getArgs(args, needed=2)
|
||||||
(_, re, flags) = re.split('/')
|
(_, regexp, flags) = re.split('/')
|
||||||
flag = 0
|
flag = 0
|
||||||
for c in flags:
|
for c in flags:
|
||||||
flag &= getattr(re, c.upper())
|
flag &= getattr(re, c.upper())
|
||||||
r = re.compile(re, flag)
|
r = re.compile(regexp, flag)
|
||||||
irc.reply(msg, ' '.join(r.findall(text)))
|
irc.reply(msg, ' '.join(r.findall(text)))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user