[TriLUG] regex: match lines NOT containing X

Brian McCullough bdmc at bdmcc-us.com
Wed Feb 22 10:10:59 EST 2012


On Wed, Feb 22, 2012 at 09:56:07AM -0500, Kevin Hunter wrote:
> Hullo List,
> 
>   I've
> needed this construct more than a few times, so I'm almost sure it
> exists; I just don't know the right Google terms, apparently.  On
> the other hand, I could accept that this may not be possible in a
> single step regex.

Not being anything like a regex guru, I might do it something like "grep two x | grep -v heads" but that is rather simplistic.


B





More information about the TriLUG mailing list