Re: help with sed-friendly regex with negative look-ahead syntax for sendmail
"Daniel Goldman
[email protected] [sed-users]" <
[email protected]>
Thu, 23 Feb 2017 12:13:49 -0800
| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
It would help if you provide an test input file, and the output you
want. Otherwise, at least for me, I'm kind of guessing about what you
are trying to do, and can't know for sure that a suggested solution does
all it needs to. Daniel
On 2/23/2017 7:51 AM, 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]
>
>
>
>
> ------------------------------------
> Posted by: Rob Kudyba <[email protected]>
> ------------------------------------
>