Computing.Net > Forums > Disk Operating System > Delete words in a text document.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Delete words in a text document.

Reply to Message Icon

Name: jammerx2
Date: April 4, 2009 at 22:05:28 Pacific
OS: Windows XP
Subcategory: General
Comment:

I have a text file, it is pretty big (1000 lines approx) and it is formatted like this

words more words even more words 1312331

Every line has a scentence then random numbers at the end. I was wondering if there was a ways, since all the numbers start with 1 and are 7 characters if the was a way to do a variable in replacement. Like replace 1****** with nothing. Any help would be appreciated.

Edit: I cannot delete all numbers because there are numbers in some spots, but none begin with 1 or are 7 characters long.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 5, 2009 at 00:59:57 Pacific
Reply:

For starters, are you really hoping to do this in DOS?

Does the alledged a scentence [sic] end with a period?

It may help to post a few lines.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: jammerx2
Date: April 5, 2009 at 07:21:37 Pacific
Reply:

No, it does not have a period. Some do but not all.

All the lines are formatted the same
its like this: *'s are numbers

******* a scentence is here 1******

I will use any way possible to do this. I just need a simple way to delete any word starting with the number 1 that has 6 other numbers.

Edit:
I have an idea, but i need to know how to just delete a single word, in a batch file. I could do something like this:

set number=999999
:start
set /a number=%number%+1
if %number%=="2000000" goto EOF
command to delete word %number%
goto start
:EOF

This would take a while but at least it would be automated. I just need to know the command to delete a single word, if there is one.


0

Response Number 3
Name: jammerx2
Date: April 5, 2009 at 18:38:55 Pacific
Reply:

I have found a temporary solution, but if there is a better one i would appreciate it.


0

Response Number 4
Name: jammerx2
Date: April 11, 2009 at 08:14:39 Pacific
Reply:

Any one have a solution, currently i use change.com, i heard there was a v9.11 that let it use files larger than 32kb. Could you post that?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Delete words in a text document.

store processing result in a text file www.computing.net/answers/dos/store-processing-result-in-a-text-file/7409.html

copying files listed in a text file www.computing.net/answers/dos/copying-files-listed-in-a-text-file/7341.html

Extracting blocks of text in from text files www.computing.net/answers/dos/extracting-blocks-of-text-in-from-text-files-/16952.html