Remove data from 1 column in text file
Sthendal
Posted messages
2
Status
Membre
-
Sthendal -
Sthendal -
Hello,
I am looking to delete the data from a column in a text file (which opens natively with Notepad), without losing the formatting of my column (so that it remains empty for the number of characters it was allotted).
However, it seems that it is not possible to select a column alone.
Thank you for your advice.
Sthendal
I am looking to delete the data from a column in a text file (which opens natively with Notepad), without losing the formatting of my column (so that it remains empty for the number of characters it was allotted).
However, it seems that it is not possible to select a column alone.
Thank you for your advice.
Sthendal
Configuration: Windows XP Internet Explorer 7.0 Notepad 5.1
4 réponses
Do you have Openoffice?
Try it:
search ^(.{40})(.{23})
replace $1 <- here 23 spaces
Check in other options that regular expressions are enabled
For 40 files, you might consider a tool like sed.
Try it:
search ^(.{40})(.{23})
replace $1 <- here 23 spaces
Check in other options that regular expressions are enabled
For 40 files, you might consider a tool like sed.
I downloaded OpenOffice that I didn't have.
Since I've never used it before, I'm fumbling around (to say the least...).
I imagine that the 2 command lines you suggest are a macro to be executed? (Tools menu / macro?).
Otherwise, I opened my txt file, but since the lines in the original file are long (up to position 202), it wraps to the next line...
Since I've never used it before, I'm fumbling around (to say the least...).
I imagine that the 2 command lines you suggest are a macro to be executed? (Tools menu / macro?).
Otherwise, I opened my txt file, but since the lines in the original file are long (up to position 202), it wraps to the next line...
You need to go to Edit -> Find & Replace
it should keep the lines when re-saving it as txt, you need to try.
it should keep the lines when re-saving it as txt, you need to try.
not bad at all! (I couldn't manage it the first time because I hadn't found where to check the regular expressions..)
I modified: search ^(.{40})(.{23}) to: search ^(.{39})(.{24}), because it started the replacement one character too far. Now it's fine.
However, instead of inserting spaces in place of the old data, it clearly writes "<- here 23 spaces"...
I modified: search ^(.{40})(.{23}) to: search ^(.{39})(.{24}), because it started the replacement one character too far. Now it's fine.
However, instead of inserting spaces in place of the old data, it clearly writes "<- here 23 spaces"...
Thank you for being interested in my problem.
This is a file generated by a software that creates it in the following format:
Filler: from 1 to 1
Title: from 2 to 25
Filler: from 26 to 26
Nb dif: from 27 to 30
Filler: from 31 to 31
Num title: from 31 to 32
Filler: from 33 to 33
Duration: from 34 to 38
Filler: from 39 to 39
Name: from 40 to 63
Filler: from 64 to 64
etc...
I want to delete the data present in the "Name" column (from position 40 to 63) while keeping the structure of the file.
I will have about forty files to process in this way...