- To: slug-chat@xxxxxxxxxxx
- Subject: Re: [chat] prob with regex
- From: invisible ink <jdub@xxxxxxxxxxxxxx>
- Date: Fri, 27 Jun 2003 13:49:29 +1000
- Cc: Michael Lake <Mike.Lake@xxxxxxxxxx>
- Reply-by: Mon Jun 30 13:48:39 EST 2003
- User-agent: Mutt/1.5.4i
invisible ink:
> $ cat mike
> PAVEY AUASF020388
> PAVEY,A AUASF02389
> PAVEY,A AUASF02390
> PAVEY,A. AUASF02391
>
> $ sed "s/PAVEY.* \(AUASF.*\)/AUASF00899 \1/" < mike
> AUASF00899 AUASF020388
> AUASF00899 AUASF02389
> AUASF00899 AUASF02390
> AUASF00899 AUASF02391
>
> Are you using GNU sed?
(If you're not, or there's some other reason why this shouldn't work, you're
better off matching everything that is 'not space', using [^ ] instead of .)
- ii
--
Penguinillas Pack GNUzis