help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what is the regular expression that matches nothing? -- I think it i


From: Randy Yates
Subject: Re: what is the regular expression that matches nothing? -- I think it is the null expression. When I do "egrep '' somefile" the result is the same as when I do "cat somefile". The result of "egrep -v '' somefile" is, as expected, nothing. HTH
Date: Fri, 24 Dec 2004 17:40:52 GMT
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, windows-nt)

Stan Brown <the_stan_brown@fastmail.fm> writes:

> There is no regular expression that matches nothing.
>
> I you want to match a zero-length line, use
>       ^$
>
> But the idea of matching nothing has an inherent contradiction. 

I don't see that. Can you explain why you say this?

> Why don't you tell us what you're actually trying to accomplish?

Sure, Stan. I'm trying to setup the EFS package in XEmacs to use a
gateway for FTP. In this mode, EFS requires a regular expression to
identify which machines are accessible without having to go through
the gateway. In my case (this is at work where we have a firewall)
that would be "no machine," i.e., all machines I FTP to (with XEmacs)
will be outside the firewall.  Thus the regexp has to match "nothing."
-- 
%  Randy Yates                  % "Rollin' and riding and slippin' and
%% Fuquay-Varina, NC            %  sliding, it's magic."
%%% 919-577-9882                %  
%%%% <yates@ieee.org>           % 'Living' Thing', *A New World Record*, ELO
http://home.earthlink.net/~yatescr


reply via email to

[Prev in Thread] Current Thread [Next in Thread]