Re: [Hampshire] Any grep gurus here?

Top Page

Reply to this message
Author: Peter Salisbury
Date:  
To: lug, Hampshire LUG Discussion List
Subject: Re: [Hampshire] Any grep gurus here?
Put the parenthesis in square brackets to indicate it's a single character?
HTH Peter
On 6 Mar 2011 17:42, "Vic" <lug@???> wrote:
>
> Hi All.
>
> I need some help with regexes in grep.
>
> I'm trying to search for a pattern along the lines of:
>
> foo(bar
>
> Note that there is no closing bracket.
>
> Like an eejit, I thought a regex of
>
> foo\(.*
>
> would match that - but grep barfs. It tells me
>
> grep: Unmatched ( or \(
>
> ...Which I knew. I'm specifically looking for an unmatched \(.
>
> Does anyone know how to make it do what I want? Using grep -F or fgrep is
> not an option - this is part of a much bigger set of searches that I can't
> disrupt.
>
> Thanks!
>
> Vic.
>
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------