I don't know how to sum this up into a subject. I'd like to know if it spossible to do a few actions against text, a list of text actuall.
I have a list of sites. and I get a new list of sites, I'd like to remove list a from list b, not neccessarily that they are in order either, I just want to find any and all complete lines in a and remove them from line b?
Also is there a way to check for duplicated lines? IE
Red
Green
Bule
Red
Yellow
it would find the second yellow and remove it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll search for this eariler message but are you suggesting that I search for each entry? If so that wouldn't be that more effictive than doing it by hand if you have a large (say 2000+) and potientially every entry is possible to be duplicated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You might be able to achieve this in a similar way as described to remove duplicate lines.
This may involve inserting line numbers, sorting the lines on their original contents, comparing them with a file comparison tool which allows showing only the differences and copying or exporting those results. You then still have to sort those lines by their original line numbers and remove those after that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I now know how to remove duplicate lines but not compare and subtract from lists. I do have a file compare program which should help me but I could combine lists and just search for duplicates.
It was too complicatedly explained and took way too much to find so I'll try to tell the simplified way here.
If you don't care about the order of your lists (list as in words or sentences on seperate lines I haven't tested if it works on single line lists) then it is a simple matter to get rid of duplicates:
Highlight everything go to the TextFX Select TextFX Tool, make sure that "Sort outputs only UNIQUE (at colum) lines" The go back to that menu and at the top select sort case insensitive or case sensitive it doesn't matter.
If you do care about the order of your list its a bit more complicated.
Select all of your text, Go to TextFX Select TextFX Tools, Select the option insert line numbers. At this point every line will now have a number added to the beginning the good thing is this is of a uniformed length with a space added so you can use the next step.
Using the Colum select (alt + ctrl held down before and while selecting) select only your text, not the line numbers. Now Back to TextFX,TextFX tools and make sure sort only outputs unique at colume is selected. After that go back to TextFX,TextFX Tools, and sort either sort option you'd like.
Now you have a unique list but its not in your original order.
Using colum sort again select only the line numbers (from the top to the bottom, get them all) and then use a TextFX Tool's sort again. This will put it back in order minus the lines deleted for being duplicates. Now you can select your entire document and use the TextFX Tool's Delete line number or first word feature to remove the line numbers or you can colum select the numbers and the added space and delete it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't see how any program would manage to do this...
Removing one list from another: what if an entry in itself is a duplicate in list B? Should all occurrences be removed if there is only one in list A? If so, you might first delete all duplicates from both lists itself and then do the diff'ing part. If not... sort both lists and use the comparison program to only show the differences.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see now that I made a type and I should have said booth red, not booth yellows as there is only one. However I did find a way to at least check for duplicates and I can trim list B to be like list A (just URLs and not URLs with descriptions) and then remove all duplicates remaining list back into the system.
I didn't need booth to be done at the same time but they could, you would just have to have an order of operations. However more than likely you wouldn't want either list to contain duplicates so you'd have a check for such before the compare. You could do it with duplicates but depending on how you do it you'd get different results
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not certain, trying to understand your reply. Did you find a solution to delete any item of list A occurring in list B? If so, what is your list of actions?
It would be nice if this could be a single TextFX action or single Simple Script statement, as well. I tried creating a macro that does the trick, but currently the inability to use either the Find/Replace dialog or TextFX commands keep me from succeeding.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry, I have not found a way to subtract list B from list A. The only thing I found was removing duplicates. This will work for me for now since I would eventually combine linst A and list B, its just that I would have to do more work for the combining process than if I could just subtract.
For subtracting I haven't tried but you could try ordering your list in notepad ++ (not sorting with only unique) and saving the files and comareing them in winmerge. That would show you the differences in the file. From there you could select orphans of either file and copy them to a thrid file.
I haven't tested that but I don't know why it wouldn't work, its more complicated than one action but at least its done with all free tools.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> For subtracting I haven't tried but you could try ordering your list in notepad ++
That's what I suggested above. As far as I know this works. I use another comparison tool that also allows to show only selected kinds of differences. It's a piece of cake "subtracting" that way.
> (not sorting with only unique)
Why is that? I would suggest to remove all duplicates in both files beforehand, so you won't be left with a remaining previously double entry in list B because of only one occurrence in list A.
If lists have to be ordered in any (other) way or like they originally were, you have to execute the magic line number trick beforehand and afterwards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know how to sum this up into a subject. I'd like to know if it spossible to do a few actions against text, a list of text actuall.
I have a list of sites. and I get a new list of sites, I'd like to remove list a from list b, not neccessarily that they are in order either, I just want to find any and all complete lines in a and remove them from line b?
Also is there a way to check for duplicated lines? IE
Red
Green
Bule
Red
Yellow
it would find the second yellow and remove it?
To remove duplicate lines, act like described in an earlier message. Try searching for it by using something like "remove+duplicate".
I'll search for this eariler message but are you suggesting that I search for each entry? If so that wouldn't be that more effictive than doing it by hand if you have a large (say 2000+) and potientially every entry is possible to be duplicated.
You might be able to achieve this in a similar way as described to remove duplicate lines.
This may involve inserting line numbers, sorting the lines on their original contents, comparing them with a file comparison tool which allows showing only the differences and copying or exporting those results. You then still have to sort those lines by their original line numbers and remove those after that.
I now know how to remove duplicate lines but not compare and subtract from lists. I do have a file compare program which should help me but I could combine lists and just search for duplicates.
It was too complicatedly explained and took way too much to find so I'll try to tell the simplified way here.
If you don't care about the order of your lists (list as in words or sentences on seperate lines I haven't tested if it works on single line lists) then it is a simple matter to get rid of duplicates:
Highlight everything go to the TextFX Select TextFX Tool, make sure that "Sort outputs only UNIQUE (at colum) lines" The go back to that menu and at the top select sort case insensitive or case sensitive it doesn't matter.
If you do care about the order of your list its a bit more complicated.
Select all of your text, Go to TextFX Select TextFX Tools, Select the option insert line numbers. At this point every line will now have a number added to the beginning the good thing is this is of a uniformed length with a space added so you can use the next step.
Using the Colum select (alt + ctrl held down before and while selecting) select only your text, not the line numbers. Now Back to TextFX,TextFX tools and make sure sort only outputs unique at colume is selected. After that go back to TextFX,TextFX Tools, and sort either sort option you'd like.
Now you have a unique list but its not in your original order.
Using colum sort again select only the line numbers (from the top to the bottom, get them all) and then use a TextFX Tool's sort again. This will put it back in order minus the lines deleted for being duplicates. Now you can select your entire document and use the TextFX Tool's Delete line number or first word feature to remove the line numbers or you can colum select the numbers and the added space and delete it.
Title suggestion: Remove (both) duplicate lines
> Red
> Green
> Bule
> Red
> Yellow
> it would find the second yellow and remove it?
I don't see how any program would manage to do this...
Removing one list from another: what if an entry in itself is a duplicate in list B? Should all occurrences be removed if there is only one in list A? If so, you might first delete all duplicates from both lists itself and then do the diff'ing part. If not... sort both lists and use the comparison program to only show the differences.
I see now that I made a type and I should have said booth red, not booth yellows as there is only one. However I did find a way to at least check for duplicates and I can trim list B to be like list A (just URLs and not URLs with descriptions) and then remove all duplicates remaining list back into the system.
I didn't need booth to be done at the same time but they could, you would just have to have an order of operations. However more than likely you wouldn't want either list to contain duplicates so you'd have a check for such before the compare. You could do it with duplicates but depending on how you do it you'd get different results
I'm not certain, trying to understand your reply. Did you find a solution to delete any item of list A occurring in list B? If so, what is your list of actions?
It would be nice if this could be a single TextFX action or single Simple Script statement, as well. I tried creating a macro that does the trick, but currently the inability to use either the Find/Replace dialog or TextFX commands keep me from succeeding.
I'm sorry, I have not found a way to subtract list B from list A. The only thing I found was removing duplicates. This will work for me for now since I would eventually combine linst A and list B, its just that I would have to do more work for the combining process than if I could just subtract.
For subtracting I haven't tried but you could try ordering your list in notepad ++ (not sorting with only unique) and saving the files and comareing them in winmerge. That would show you the differences in the file. From there you could select orphans of either file and copy them to a thrid file.
I haven't tested that but I don't know why it wouldn't work, its more complicated than one action but at least its done with all free tools.
OK, thanks for your explanation.
> For subtracting I haven't tried but you could try ordering your list in notepad ++
That's what I suggested above. As far as I know this works. I use another comparison tool that also allows to show only selected kinds of differences. It's a piece of cake "subtracting" that way.
> (not sorting with only unique)
Why is that? I would suggest to remove all duplicates in both files beforehand, so you won't be left with a remaining previously double entry in list B because of only one occurrence in list A.
If lists have to be ordered in any (other) way or like they originally were, you have to execute the magic line number trick beforehand and afterwards.