Re: help with sed-friendly regex with negative look-ahead syntax for sendmail

"Tim Chase [email protected] [sed-users]" <[email protected]> Thu, 23 Feb 2017 13:35:35 -0600
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
On 2017-02-23 15:51, Rob Kudyba [email protected] [sed-users] wrote:
> So the below regex (the left side in bold) does not seem to work in
> sendmail's R & K commands. I’m trying to allow emails from cities
> and schools that have email addresses that look like:
> [email protected] or [email protected]. It seems that
> negative look-aheads are not supported. Would anyone have any idea
> on how to make this sed-friendly syntax? Note that the right side
> (unbolded) works fine by itself.
> (?!.*\@ci\..+?\.us$)(?!.*\@*\..+?\.ny.us$)[a-zA-Z_0-9.-]+<@[a-zA-Z_0-9-]+?\.+[a-zA-Z_0-9.-]+?\.(us|info|to|br|bid|cn|ru)
> 
> 
> [Non-text portions of this message have been removed]

Your message came through as plain-text (and the mailing list
apparently stripped any HTML mime-part) which doesn't show bold.
Could you provide parallel examples of both the working and
non-working regexps?

-tim