Page 1 of 1

Copy and paste/insert

Posted: Sat Feb 04, 2017 10:24 am
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

Re: Copy and paste/insert

Posted: Mon Feb 06, 2017 3:32 pm
by access1denied
I was informed that TextPipe is not able to handle such a complex process... Still a good product

Re: Copy and paste/insert

Posted: Tue Feb 14, 2017 7:24 am
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?

Re: Copy and paste/insert

Posted: Sat Mar 25, 2017 8:00 am
by access1denied
Yes, we have purchased the software... It was a consultant whom informed us of this..

Re: Copy and paste/insert

Posted: Mon Mar 27, 2017 7:02 am
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@]
|