Announcement

Collapse
No announcement yet.

Ignoring specific differances

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

  • Ignoring specific differances

    I'm sure this is a relativly trivial operation, however I'm not sure how exactly to go about it...

    I am comparing config files from network devices. Two of the devices I'm working with have ports that are logically the same, however physically differant (i.e. ethernet1/1 on one device could be ethernet3/1 on the other).

    Is there a way to specify a rule that will ignore only this differance on a line? So it would treat ethernet1/1 to be the same as ethernet3/1 but still catch any differances after this match on the same line?

    I would only like to ignore specific matches that I can predefine (e.g. ignore lines where eth1/1 on the left = eth2/1 on the right but don't ignore lines where eth1/1 = eth3/1 on the right, etc).

    Thanks!

  • #2
    Re: Ignoring specific differances

    Ok, I think this will work. Please comment if there is a better way or if this coudl be problematic.

    I'm defining a rule for unimportant text using the following regex:
    (ethernet2\/3|ethernet1\/2){1,2}

    If I understand this correctly it will match either ethernet2/3 or ethernet1/2 and has to match it a minimum of once and a maximum of twice.

    Any potential issues with this?

    Comment


    • #3
      Re: Ignoring specific differances

      I don't think / is a special character in regular expressions, so you might not have to escape it with \ in your regexp.

      Otherwise, it looks good, and marking it as unimportant text with a regular expression is the best way to handle this in Beyond Compare 2.
      Chris K Scooter Software

      Comment

      Working...
      X