Announcement

Collapse
No announcement yet.

How to ignore capital letters in some parts of the file?

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

  • How to ignore capital letters in some parts of the file?

    Hi,

    I have a tricky question. Lets say I have the follwing files:

    - File A -
    [1]Bla bla bla=YES
    [2]Bla bla bla=NO
    [3]Bla bla bla=NO
    [4]Bla bla bla=Hello

    - File B -
    [1]Bla bla bla=Yes
    [2]Bla bla bla=No
    [3]Bla bla bla=Yes
    [4]Bla bla bla=HELLO

    I would like that, in lines 1 and 2, the words YES/Yes and NO/No were marked as unimportant
    However, I would like that lines 3 and 4 were marked as different.

    I thought that adding the two following "unimportant text rules" would do it:
    =(YES|Yes|yes)$
    =(NO|No|no)$

    But it doesn´t. The result of these rules is that lines 1 and 2 are marked as unimportant, and 4 as different, that is ok, but line 3 is maked as unimportant, and that is wrong. In other words, I would like to ignore caps for yes/no, but not in the rest of the file.

    Any suggesttion?

    P.S. I'm using version 2.5.1, just in case is important

  • #2
    Actually, that is not wrong.

    If a line is unimportant, that means that it is unimportant no matter what is on the other side of the compare.

    You do not want to set the element as unimportant. You want to set the element as case insensitive.
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

    Comment


    • #3
      BC2 treats the words as unimportant, so NO~Yes results.

      I think it isn't possible to do this in BC2, so you should give BC3 a try:

      1. Open File A and File B in a text compare
      2. Open Rules/Importance tab
      3. Open Edit Grammar/Grammar tab
      4. Select New, enter a name like "YesNo", category "List", Text in List "[Yy][Ee][Ss]" and "[Nn][Oo]" on the second line, only Regular expressions checked
      5. Close 4. and 3.
      6. Leave "YesNo" in Grammar Elements checked
      7. Checkmark "Everything Else" and "Character Case"

      Comment


      • #4
        Thank you very much!


        I am gathering reasons to convince my boss to make the move to BC3. This will be one of them :-)
        Last edited by aag_bc; 29-Jan-2009, 09:56 AM.

        Comment


        • #5
          Hello,

          BC2 has Case Insensitivity, but it is global, so it would affect Line 4 as well. You would need BC3 and Lutz's post to perform this type of a compare.

          Thanks Michael and Lutz.
          Aaron P Scooter Software

          Comment

          Working...
          X