Well, an answer still missing is what to do if there is only one (1) phrase on a line. With current scripts the entire line will be deleted.
I was revising because I don't like forget the thread.The forum has a 'Mark topic' button with several options to keep topics in sight...

How about this one? source=Source.txt
target=Target.txt
#NoEnv
#SingleInstance,Force
SetBatchLines,-1
string:=""
FileRead,lines,%source%
Loop,Parse,lines,`n ; Split by line break
{
StringSplit,part_,A_LoopField,. ; Split by period
If part_0<3 ; 1 part
line:=A_LoopField
Else
StringReplace,line,A_LoopField,%part_1%., ; Remove part 1
line=%line% ; Remove trailing space
string.=line "`n" ; Add line break
}
FileDelete,%target%
FileAppend,%string%,%target%
Well, an answer still missing is what to do if there is only one (1) phrase on a line. With current scripts the entire line will be deleted.I am going to try the script Skrommel


What can we do now ?Just as has happened before, it is quite difficult to understand what you are saying...
The post is opened but not working !!!!!!
I understand.What can we do now ?Just as has happened before, it is quite difficult to understand what you are saying...
The post is opened but not working !!!!!!
We had come to a working solution (post #18 in this thread, accepted by you in post #19), with only 1 question remaining:
- What should happen if a line in the file has only 1 period in it. Should that line be removed, or should it remain in the output?
Until this question is answered (I have asked 4 times before for an answer on this, this is the 5th and last time), any other questions (or solutions) here should be postponed, IMHO.

I understand.Well, the only thing we want you to do, in this situation, is to answer the question. Why is that so hard? It's not a difficult question, and only a yes or no answer is enough.
Sorry if I cannot do my best.

Please . What is the question exactly i can respond yes or no ?
- What should happen if a line in the file has only 1 period in it. Should that line be removed, or should it remain in the output?
Phrase 1. Phrase 2. Phrase 3.
Phrase 4.
Phrase 5. Phrase 6. Phrase 7.Phrase 2.
Phrase 3.
Phrase 4.
Phrase 6.
Phrase 7.Phrase 2.
Phrase 3.
Phrase 6.
Phrase 7.That line must be removedPlease . What is the question exactly i can respond yes or no ?- What should happen if a line in the file has only 1 period in it. Should that line be removed, or should it remain in the output?
. Perhaps an example would better explain the question?
Input text:CodePhrase 1. Phrase 2. Phrase 3. Phrase 4. Phrase 5. Phrase 6. Phrase 7.
Output Option 1 (Phrase 4 remains since it is the only Phrase in the line):CodePhrase 2. Phrase 3. Phrase 4. Phrase 6. Phrase 7.
Output Option 2 (Phrase 4 is removed because it is the first Phrase in the line):CodePhrase 2. Phrase 3. Phrase 6. Phrase 7.
Which is the preferred output option, 1 or 2?
Original address: https://www.donationcoder.com/forum/index.php?topic=43524.0