Announcement

Collapse
No announcement yet.

Rules Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rules Question

    Is there a way to tell BC to ignore certain characters in a line (or to equate them). I'd basically like it to equate a regular dash (-) with an emdash (—) -- but it would be fine if BC just ignored them all.

    Thanks in advance.

  • #2
    Re: Rules Question

    It isn't possible to mark two text strings as equivalent with the current version of BC, but you can have BC ignore all - characters.

    In File Viewer, select Tools|Edit Current Rule.
    Go to the Importance tab.
    Click New in the Unimportant Text section.
    Select the Regular Expression category.
    Enter - in the regular expression.

    This will ignore all - characters anywhere in the text.

    If you only want to ignore dashes surrounded by spaces, you can use
    \s-\s.
    There is more information on regular expressions in the help file.
    Chris K Scooter Software

    Comment


    • #3
      Re: Rules Question

      Cool, thanks. That didn't seem to do what I needed it to do (they still show up as being different) so I wrote a quick windows scripting host file to just do a replace on all of the emdashes to convert them to dashes. That works well enough -- I just have to make my changes in a different editor.

      Thanks again. And Beyond Compare really is a great tool! I can't wait for V3!

      Comment


      • #4
        Re: Rules Question

        Do you have View| Ignore Unimportant Differences turned on?

        Also, you can run your script inside of BC.
        Edit the rule.
        Go to the Conversion tab.
        Select External program as your Conversion Type.

        The syntax for the converter would be something like "convert.exe %s %t". BC expands %s and %t as the source and target filename to pass to the converter.

        If you'd still like to have BC mark the - as unimportant, please email a examples of the files you're comparing to support, along with a .zip of your settings using Help|Support and the Export button and we'll take a look at it.
        Chris K Scooter Software

        Comment

        Working...
        X