in reply to Altering data files
Alternatively, you could set $/='}' (see perlvar) and apply that regex to each "line", writing out to another file as you go.perl -0777 -pe 's/(?<="StrCatDone" "1";\s+"seq_name" ")sequence.V5_0(? +=";)/sequence_FOO/sg' datafile.txt
|
|---|