Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Re: Matching text in email header only if one string does NOT match

  •  05-06-2007, 6:11 PM

    Re: Matching text in email header only if one string does NOT match

    Just use something like:

    ^From:[^<]+<(?!user1@example\.com)(?!user2@example\.org)(?!user3@example\.net).*?^X-Spam-Level:\s*(\S*)

    with singleline (s) and multiline (m) modifiers (so the dot matches newlines and ^ matches the beginning of each line).

View Complete Thread