Networker

Re: [Networker] nsradmin regular expressions

2002-09-26 18:10:28
Subject: Re: [Networker] nsradmin regular expressions
From: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Thu, 26 Sep 2002 17:10:25 -0500
In regard to: Re: [Networker] nsradmin regular expressions, Chad R. Larson...:

At 02:56 PM 9/26/02 , Tim Mooney wrote:
The problem is that there's no way to do backreferences that I'm aware of,
so in the example you show above, your *entire* owner notification will be
replaced with `jimuser...', rather than just the one part of the RE that
your selection matched.

You backreference by enclosing the part you want to re-use in escaped
parentheses, and then use an escaped number to match the n'th sub-expression.

:-)  Uh, yeah, thanks, but I meant "... there's no way to do backreferences
within nsradmin, that I'm aware of".  Of course ed/sed/perl etc. allow for
that, but as far as I can tell nsradmin doesn't.  It allows you to use
REs to in a query, but it doesn't appear you can use backreferences in
your nsradmin updates.

Tim
--
Tim Mooney                              mooney AT dogbert.cc.ndsu.NoDak DOT edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
Note: To sign off this list, send a "signoff" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

<Prev in Thread] Current Thread [Next in Thread>