Page 1 of 1

Clipboard compare and ignoring lines

Posted: Mon Mar 03, 2008 4:25 pm
by casman
Hello forum.

I have tried doing the following with no success. Any advice would be greatly appreciated.

I call up the 'Compare New Pair' dialog box and select 'Files'.
I then copy my text from the Clipboard.

I would then like to sort the lines, ignoring all lines starting with #, then compare the remaining lines.

Whenever I try this it does not seem to sort the data, and it ignores 'some' of the lines beginning with # but not all. It seems if there is a difference in a line beginning with #, then it is included in the comparison, I want it to be ignored.

I have tried doing this with the latest official release and ExamDiff Pro latest beta version.

Regards,
Casman.

Re: Clipboard compare and ignoring lines

Posted: Mon Mar 03, 2008 5:04 pm
by psguru
When you compare your clipboard contents, do you get the comparison results (let's ignore the rest for a second)?

Then, if you do, how exactly do you sort your texts? Since these are not named files, you can't use plug-ins. On the other hand, you probably don't need to sort at all. If all you need is to ignore lines that start with #, use the following regular expression with Options | Compare | Ignore lines matching regular expression:

^#

Re: Clipboard compare and ignoring lines

Posted: Mon Mar 03, 2008 8:27 pm
by casman
Hi psguru.

Thank you for your prompt response.

When I do the compare, I do actually get the comparison results, but unsorted. To sort them, I thought I would simply tick the sort plugin, as I need to sort the list prior to comparing.

With the other problem, I need to completely ignore all lines starting with a #, however, the program seems to ignore the lines beginning with # only if there are no differences. If there are differences on the line, even if it begins with a #, then it will include the line in the display.

Regards,
Casman

Re: Clipboard compare and ignoring lines

Posted: Mon Mar 03, 2008 8:52 pm
by psguru
Did you try the option I recommended? Could you post a screenshot?

Re: Clipboard compare and ignoring lines

Posted: Tue Mar 04, 2008 6:03 pm
by casman
Hi psguru.

I have tried your suggestion with the same result.

I have attached a pdf (zipped) file with screenshots of my 'Compare' options, the comparison screen before and after applying the Filters.

Regards,
Casman.

Re: Clipboard compare and ignoring lines

Posted: Tue Mar 04, 2008 6:41 pm
by psguru
You are using the wrong Ignore option: instead of "Parts matching regular expression" you need to use "Lines matching regular expression" -- since that's what you want.

Re: Clipboard compare and ignoring lines

Posted: Wed Mar 05, 2008 1:27 pm
by casman
Hi psguru.

That worked for getting rid of the comments. Thanks.
Any chance of getting sorting (or any plugin) working when comparing data pasted in from the clipboard; this would be really useful.

Regards,
Casman.

Re: Clipboard compare and ignoring lines

Posted: Wed Mar 05, 2008 4:50 pm
by psguru
It's already possible. Once you compare, right-click in the file pane and select Apply Plug-In | Sort.