Copy and paste/insert

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

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

Copy and paste/insert

Post by access1denied »

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

Post by access1denied »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Copy and paste/insert

Post by DataMystic Support »

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?
access1denied
Posts: 11
Joined: Wed Apr 03, 2013 4:40 am

Re: Copy and paste/insert

Post by access1denied »

Yes, we have purchased the software... It was a consultant whom informed us of this..
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Copy and paste/insert

Post by DataMystic Support »

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 528 times
Post Reply