Insert 2 lines of code?

General discussions about Advanced Find and Replace
Post Reply
RumMunkey
Posts: 3
Joined: Mon Jan 31, 2005 5:32 pm

Insert 2 lines of code?

Post by RumMunkey » Mon Jan 31, 2005 5:32 pm

Hi there, I need one last bit of help to get my configuration (original post) finished.

I have a file that looks (in part) like this:

DR:072435578192500004
DR:060249862134900002
DR:082564616492900002
PR:3120178
DR:060249867829900034
DR:060249860457100001
DR:063881272289800025
PR:3120188
DR:080526109006300001
DR:080526109006300001
DR:080526109006300001
DR:080526109271500001
PR:3120190
DR:008585400072700001
DR:080526109134300001




And I need to insert three new lines of code in the line above each "PR" line so I get this:


DR:072435578192500004
DR:060249862134900002
DR:082564616492900002
TR:8112091748300773400030
HR:8112091748300773400030
SR:SC20050BOX

PR:3120178
DR:060249867829900034
DR:060249860457100001
DR:063881272289800025
TR:8112091748300773400030
HR:8112091748300773400030
SR:SC20050BOX

PR:3120188
DR:080526109006300001
DR:080526109006300001
DR:080526109006300001
DR:080526109271500001
TR:8112091748300773400030
HR:8112091748300773400030
SR:SC20050BOX

PR:3120190
DR:008585400072700001
DR:080526109134300001


Can this be done with AFR?

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Jan 31, 2005 5:32 pm

Again in batch replace you may use the following code:

Search for:
PR:

Replace with:
TR:8112091748300773400030\r\nHR:8112091748300773400030\r\nSR:SC20050BOX\r\nPR:

(regular expressions should be activated)

OR you may try Replace operation with Insert Before command. (Remove trailing CRLF should be off);
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest