Announcement

Collapse
No announcement yet.

Possible to ignore part of a line?

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

  • Aaron
    replied
    Yes, and the Regular Expression you have should work (I just tested it out given this example). When you defined the grammar, type Basic, did you enable the Regular Expression option?

    Then, in the Session Settings of the Text Compare, Importance tab, uncheck your grammar element name. In the main view, does this cause your text to become blue or black (instead of red)? That indicates the grammar is correct; you can then set it to black with the Ignore Unimportant Differences toggle in the toolbar.

    Leave a comment:


  • RobFromLI
    started a topic Possible to ignore part of a line?

    Possible to ignore part of a line?

    I'm comparing two text files. I need to ignore part of a line and I've looked through the KB article on defining grammar parts and marking them unimportant by de-selecting them. I can't get this to work and before I waste too much time I want to make sure what I'm trying to do is possible.

    Let's say I have two lines in two different files:

    File 1: dim x as integer = 8
    File 2: dim x_v_1_3 as integer = 8

    what I want to do is to ignore anything of the format _v_\d_\d
    This text is a version number that I don't care about, and it will always be in the format _v_#_#.

    So, if I have
    File 1: dim x as integer = 8
    File 2: dim x_v_1_3 as integer = 8

    These should be considered the same. But if I have:

    File 1: dim x as integer = 8
    File 2: dim x_v_1_3 as integer = 9

    These should be considered different because something other than the _v_#_# is different.

    Is this possible, to ignore just part of a line?

    Thanks

    Rob
Working...
X