[ale] egrep question
    Keith Hopkins 
    hne at hopnet.net
       
    Sat Mar 16 19:32:20 EST 2002
    
    
  
Ken Nagorski wrote:
> Hi there,
> 
> How would I grep ^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.(com|org|net)$ using egrep,
> That works in perl but I just can't seem to get it to work using egrep!
> 
> Thanks
> Ken
> 
What exactly are you trying to do?  It looks like it might find {bol}{one-or-more-alphanum}.{one-or-more-alphanum}.{domain}{eol}.  Is that what you want?
keithh at hera:~> cat phred
abc123.hithere.com
abc^123.hithere.com
hitbox.org
www.hitbox.org
keithh at hera:~> egrep "^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+\.(com|org|net)$" phred
abc123.hithere.com
www.hitbox.org
It works for me.
keithh at hera:~> egrep --version
egrep (GNU grep) 2.4.2
-- 
Lost in Tokyo,
   Keith
     Jack of All Trades, Anarchist
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.
    
    
More information about the Ale
mailing list