If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
By nature, Replacements in BC define how text on one side is to be matched with text on the other side. Since null is the absence of text, such a match cannot occur and the definition of such a replacement is not allowed.
BC v4.0.7 build 19761
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Text is considered unimportant if it has a matching element on the other side. Replacements performs a logical replacement of text on one side to match a specific value on the other side. As I mentioned above, replacing with a null does not satisfy the requirements of this design. If you want an element on one side to be unimportant, define a grammar element instead of a replacement and set the grammar element as unimportant.
BC v4.0.7 build 19761
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
As Michael said, replacements are designed to handle text changing from something to something else. We aren't gpoing to change that. If you want to ignore arbitrary text add it to the grammar and make it unimportant. That's currently harder than it needs to be, especially for one-off things like this, and we are planning on improving that.
I do expect us to add some sort of ad-hoc unimportance parsing, that doesn't interfere with the file format's grammar, but it won't be "Replace 'xxx' with ''". I also can't comment on whether it will be a session or file format setting. The current behavior is powerful, but too complicated for most use, and we are going to revisit how things are divided at some point.
How does it interfere with your other sessions? If you define the grammar definition, its importance is controlled per session. By default you can consider it Important, but for that specific session consider it Unimportant. Or vice versa.
Specific examples would help as test cases as we investigate changing this feature.
Right == left except right's 30s\Loud\ is changed to null on left.
I would like the session Replacement Item to replace 30s\Loud\ with null. This case is lucky - I can workaround using \30s\Loud\ -> \.
BTW, nowhere AFAICT on the UI does Replacement Item indicate that it makes the target text unimportant (very nice that it does, BTW) rather than truly replaced. I think it should indicate.
For that example, first define a grammar element that matches "\30s\Loud\" and give it a unique name, like "30Loud directory" or "directory section".
Then, in the Home screen, go to Edit session defaults, select Text Compare, and uncheck "30Loud directory" in the Importance tab. This will mark it as unimportant for all future Text Compare sessions. If you have an already saved Text Compare session, or a Folder Compare that has specific child comparison settings set, then you may need to change it there as well. If you run into a problem with a specific session, please email us your Support package (Help menu -> Support; Export) and a pair of example files. Please include a link to this forum post as well.
Comment