Tugger the SLUGger!SLUG Mailing List Archives

Re: [chat] prob with regex


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