Copy and paste/insert

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Copy and paste/insert

Postby access1denied » Sat Feb 04, 2017 10:24 am

I have a file that contains data in the in the following order

12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I need to use textpipe to copy column 1-5 and paste (insert) it at each line until the end of the dashes ------- then loop the process again so the result will be:

12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
12345 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
45454 Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data

access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Re: Copy and paste/insert

Postby access1denied » Mon Feb 06, 2017 3:32 pm

I was informed that TextPipe is not able to handle such a complex process... Still a good product

User avatar
DataMystic Support
Site Admin
Posts: 2197
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Copy and paste/insert

Postby DataMystic Support » Tue Feb 14, 2017 7:24 am

That's incorrect, not sure who told you that.

TextPipe can easily handle this by grouping all the lines together between dashes, extracting the first 5 characters, and adding a left margin.

Are you a current customer?
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Re: Copy and paste/insert

Postby access1denied » Sat Mar 25, 2017 8:00 am

Yes, we have purchased the software... It was a consultant whom informed us of this..

User avatar
DataMystic Support
Site Admin
Posts: 2197
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Copy and paste/insert

Postby DataMystic Support » Mon Mar 27, 2017 7:02 am

This will be easier to show than to explain... file attached, text export below:


|
|--EasyPattern [[ capture(5 chars) as 'header', capture(1+ char) as 'text', longest 10+ '-', longest optional( cr, lf ) ]] with [$0]
| | [X] Match case
| | [ ] Whole words only
| | [ ] Case sensitive replace
| | [X] Prompt on replace
| | [ ] Skip prompt if identical
| | [ ] First only
| | [ ] Extract matches| | Maximum text buffer size 4096
| |
| +--Restrict lines:2..-1
| |
| +--Restrict to each line in turn
| |
| +--Add left margin [@header@]
|
Attachments
copy text to each line.zip
(1.29 KiB) Downloaded 3 times
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 2 guests