The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-05-2008
spirtle spirtle is offline
Registered User
  
 

Join Date: Jun 2008
Location: Scotland
Posts: 150
I am unfamiliar with Squid, and maybe regexps work differently there, but it looks to me like you need the '?' operator which matches the preceding expression 0 or 1 times, e.g.
Code:
http://(www\.)?microsoft\.com/
does what you want when used as a grep argument.