Skip to content

Regex: Bar not preceded by Foo #762

@Yoric

Description

@Yoric

I'm writing a spam-checker that, among other things, uses regex to notice suspicious keywords. An extension to regexp, if it's possible at all, would be very useful for my usecase.

For instance, "arian" (sic) is a keyword used by neonazis. Having the word "arian", even as part of another word ("proudarian"), should raise the suspicion on the message. On the other hand, "hungarian" or "libertarian" shouldn't flag as uses of the word "arian".

So, I'd like to be able to write something along the lines of ^(hung|libert)ar[iy]an to match the possibly-bad uses of "arian" while ignoring known-to-be-ok uses of that pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions