Delete Variable Length Text
Posted: Fri Jun 14, 2013 9:20 pm
I'm new to the forum and the TextPipe product. I am in my third day of evaluating the software and I'm stuck. Here's the overview of what I am trying to do: using SSIS 2012, download a text file from a FTP site every day, parse through the file using TextPipe grabbing only certain elements and then update a database with those elements. My question relates to parsing the file with TextPipe...
Here is what I want the file to look like after processing through TextPipe (I didn't enclose this information in code brackets because it's not really code):
runNumber 133293238 ICN 1013140549270
runNumber 133286956 ICN 1013135241820
runNumber 133292468 ICN 1013140552240
runNumber 133291020 ICN 1013140551990
Here is where I've gotten to so far using TextPipe:
runNumber 133293238 19 595.77 0 595.77 ICN 1013140549270
runNumber 133286956 4 666.66 0 ICN 1013135241820
runNumber 133292468 19 638.81 0 638.81 ICN 1013140552240
runNumber 133291020 1 613.49 0 613.49 ICN 1013140551990
I can't figure out how to delete a variable-length block of text (and I feel rather dumb for not being able to figure it out). The underlined red text needs to be removed. The "runNumber" can be variable-length also (although in my example above that is not the case). If I were to state what I want to accomplish in words: "Delete all text starting after the space following the last digit of the runNumber until the letter "I" is found".
I do apologize if this is a truly newbie question; I browsed the forum and found some posts that were close to what I need to do, but I'm not experienced enough with TextPipe to modify those to fit my needs.
Thanks.
Kris
Here is what I want the file to look like after processing through TextPipe (I didn't enclose this information in code brackets because it's not really code):
runNumber 133293238 ICN 1013140549270
runNumber 133286956 ICN 1013135241820
runNumber 133292468 ICN 1013140552240
runNumber 133291020 ICN 1013140551990
Here is where I've gotten to so far using TextPipe:
runNumber 133293238 19 595.77 0 595.77 ICN 1013140549270
runNumber 133286956 4 666.66 0 ICN 1013135241820
runNumber 133292468 19 638.81 0 638.81 ICN 1013140552240
runNumber 133291020 1 613.49 0 613.49 ICN 1013140551990
I can't figure out how to delete a variable-length block of text (and I feel rather dumb for not being able to figure it out). The underlined red text needs to be removed. The "runNumber" can be variable-length also (although in my example above that is not the case). If I were to state what I want to accomplish in words: "Delete all text starting after the space following the last digit of the runNumber until the letter "I" is found".
I do apologize if this is a truly newbie question; I browsed the forum and found some posts that were close to what I need to do, but I'm not experienced enough with TextPipe to modify those to fit my needs.
Thanks.
Kris