Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2017

    Default Ignore n characters following a specific string


    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
    PE3ZZZZ 0002 007ENNNNZ024 1234500000000

    Thanks in advance for your help.

  2. #2
    Join Date
    Oct 2007
    Madison, WI



    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:

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts