in reply to Re: search and replace on a line by line basis
in thread search and replace on a line by line basis

Or to minimize it one more character....

s/^(.{188})[^0]\d{7}(.{16})$/${1}20020101$2/'

Update: As the AM below notes, this does not solve the original question, just minimizes the previous poster's RE.

Replies are listed 'Best First'.
Re: Re: Re: search and replace on a line by line basis
by Anonymous Monk on Apr 16, 2004 at 05:15 UTC
    that ^0 will skip anything starts with 0. it's not what the poster want.

    how about s/^(.{188})(?!0(8))(.{16})$/${1}20020101$4/