pastycake
pastycake copied to clipboard
Keyword handling change(s)
I'd like to change the keyword handling a bit, namely from re.search(''.join(kws))
to for kw in kws: re.search(kw)
for two reasons:
- One can then not only store the matched text but also the id of the matcher, thus allowing one to tweak them in case of too many/few hits
- It opens the way to implement python-based matching functions/class methods, so that one can specify boolean conditions that must be met for a match to be the case. (so one could say "all entries with password in it, but only if the remainder contains some hex numbers but not program code (if, {}, etc)")