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

Re: regexp: anything but |

On Wed, Dec 09, 2009 at 08:17:04PM +0100, Johannes Wiedersich wrote:
> What you'd want is probably
> sed '/[^|]-[0-9]/d' channels.dvb
> which will delete all lines with a '-[0-9]' that is not directly
> preceded by a |

lee@yun:~/tmp/chan$ cat channels.dvb | sed '/[^|]-[0-9]/d' | wc -l
lee@yun:~/tmp/chan$ wc -l channels.dvb 
2162 channels.dvb

So this leaves only the first line. That's not what I'd want ;)

I'll play around with those, now I feel challenged ...

Reply to: