BKrev: 4148f8d01xum7PhEwpKyjez-QS0XSw
def oe_filter(f, str, d):
from re import match
- ret = []
- for w in str.split():
- if match(f, w, 0):
- ret += [ w ]
- return " ".join(ret)
+ return " ".join(filter(lambda x: match(f, x, 0), str.split()))
def oe_filter_out(f, str, d):
from re import match
- ret = []
- for w in str.split():
- if not match(f, w, 0):
- ret += [ w ]
- return " ".join(ret)
+ return " ".join(filter(lambda x: not match(f, x, 0), str.split()))
die() {
oefatal "$*"