sellige: -------------------------------------------------------------------------------- Hello, I want to compare two files and put common lines into a third file. Is it possible with the diff function, or another way? I think it is possible to put differences in another file , but not common lines. Thank you --------------------------------------------------------------------------------
Hi, currently, I can only think about a workaround using the present functionality: After performing the comparison, use "Both windows into new file" via the icon "results processing". In this joined file, You can search for identical line parts using a regular expression : In the Find dialog (Ctrl+F) check [x] Regular expression search e.g. for: ^([^|]*) +\| \1$ Use the [Copy] button to get a list of matching "doubled" lines in a new file. Here You can use regular expression replacement: ^([^|]*) +\| \1$ replace with: $1 To get the list of the original lines common for both texts. This way is inexact with regard to whitespace (because of the added space padding of the comparison results). The original data also must not contain the separator | (in such cases it would require a more complex handling). hth, vbr -- <http://forum.pspad.com/read.php?2,69019,69020> PSPad freeware editor http://www.pspad.com
