Add a new line on the end of a specific text

General discussions about Advanced Find and Replace
Post Reply
derek
Posts: 3
Joined: Tue May 17, 2005 8:57 pm

Add a new line on the end of a specific text

Post by derek » Tue May 17, 2005 9:10 pm

If I could get help?
I am trying to add _ on a new line
Old text

dn: CN=Redwood
changetype: modify
proxyAddresses: SMTP:RedwoodStaff@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa0acf-3249ccd1-699eed6-e2d6a2e5
proxyAddresses: GWISE:testlab1@testlab.com

dn: CN=tpat55
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com


Want to be text

dn: CN=Redwood
changetype: modify
proxyAddresses: SMTP:RedwoodStaff@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa0acf-3249ccd1-699eed6-e2d6a2e5
proxyAddresses: GWISE:testlab1@testlab.com
_

dn: CN=tpat55
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com
_


Thank you

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

Post by Abacre » Tue May 17, 2005 10:39 pm

There are plenty of ways.
For example if you want to replace new line by _
then it can be done using regular expressions:
go to Batch replace tab and check on "Use regular expressions"
then Search for:
\r\n\r\n

Replace with:
\r\n_\r\n\r\n

But you can also use different "end" tags like GWISE to determinate
where you have to place _ and so on.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

derek
Posts: 3
Joined: Tue May 17, 2005 8:57 pm

Post by derek » Wed May 18, 2005 12:22 pm

Works great. Thank you.
One last quick question. How to enter empty-space between lines?

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

Post by Abacre » Wed May 18, 2005 1:00 pm

What do you mean empty space?

Source text

Code: Select all

dn: CN=tpat55 
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com


Resulting text

Code: Select all

dn: CN=tpat55 

changetype: modify
 
proxyAddresses: SMTP:tpat55@testlab.com

proxyAddresses: X400:c=US;a=testlab

proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9

proxyAddresses: GWISE:testlab2@testlab.com


Then you may use search for:
\r\n
replace with:
\r\n

because \r\n is new line separator.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

derek
Posts: 3
Joined: Tue May 17, 2005 8:57 pm

Post by derek » Mon May 23, 2005 7:50 pm

Space between sections. Sorry for such a trivial question.

dn: CN=tpat55
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com

dn: CN=tpat55
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com

dn: CN=tpat55
changetype: modify
proxyAddresses: SMTP:tpat55@testlab.com
proxyAddresses: X400:c=US;a=testlab
proxyAddresses: gwise:UID=f3aa9acf-3269ccd1-6ooeed6-e2d6a1e9
proxyAddresses: GWISE:testlab2@testlab.com

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest