Announcement

Collapse
No announcement yet.

Ignore n characters following a specific string

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

  • Ignore n characters following a specific string

    Hello,

    I have a lot of text files to compare for work and some differences can be ignored.
    Is it possible to have a rule to ignore let's say the 5 characters following a specific string?

    Example that I don't want to be marked as a difference :

    PE3ZZZZ 0002 007ENNNNZ024 0272000000000
    And
    PE3ZZZZ 0002 007ENNNNZ024 1234500000000

    Thanks in advance for your help.
    Goma

  • #2
    Hello,

    BC4 does not have a conditional grammar definition (if this, then this), but you could define a grammar that matches on the entire structure. Something similar to:
    PE3ZZZZ 0002 007ENNNNZ024 \d{4}

    However, if this aligns to entirely different text, then the front part (PE3...) would also be considered Unimportant. The other side would be important or unimportant difference, depending on if it also has a grammar definition.

    For details on defining a grammar item, and marking it as Important or Unimportant, please see this KB article:
    http://www.scootersoftware.com/suppo..._unimportantv3

    Let us know if you have any questions.
    Aaron P Scooter Software

    Comment

    Working...
    X