Announcement

Collapse
No announcement yet.

Simple comparison for Text Ignore

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

  • Simple comparison for Text Ignore

    Dear All,

    I wanted to ignore characters which is coming after character V below:
    Invoice Totals - 12345678901234567890V155

    Invoice Totals - 12345678901234567890V can come any where in my report which I am using for comparison.
    my current regex is showing the difference i.e. 1 and 2 highlighted below. I wanted to ignore any characters coming after V.

    Invoice Totals - 12345678901234567890V1 with Invoice Totals - 12345678901234567890V2

    Thanks in Advance!

  • #2
    Hello,

    You can define a RegEx to match on this sequence. However, how static are your files? Does V appear anywhere else in a pattern like this that needs to be important?
    This RegEx would match on V immediately followed by at least 1 digit and extends to the end of the line.
    V\d+$

    We have a KB article on the subject here:
    http://www.scootersoftware.com/suppo..._unimportantv3
    Aaron P Scooter Software

    Comment


    • #3
      Thanks Aaron. V\d+$ works for "Invoice Totals - 12345678901234567890V1" i.e. last 1 character . As you have asked my sequence would have 12 characters after V. Plus this is not working for pdf files. I did try by selecting File Formats as PDF/Grammer/added new one and saved and reloaded files and moved session settings and ignored(unchecked) above created one in the Importance section still did'nt work. Please suggest.

      Comment


      • #4
        Would you be able to post the full text of an example line? The RegEx must match exactly, so if there are any differences (like extra whitespace at the end of the line) it would have to be included in the definition.

        If you need to, you can email the example files to support@scootersoftware.com (please include a link back to this forum thread in the email for our reference).
        Aaron P Scooter Software

        Comment


        • #5
          I was able to solve the issue with using V\d+[0-9]. But didn't understand it clearly, Does +[0-9] is going to compare any digits 0-9 in that sequence only and not the entire line. I tested it and it was not disturbing remaining contents in the same line. Thank You.

          Comment


          • #6
            For the Regular Expression
            V = literal 'V'
            \d+ = at least 1 or more digits
            [0-9] = a single 0 through 9 character as the last character.

            The [0-9] is probably redundant, but what was altered was removing the need to match on the end of line, so this can match on Vdigits regardless of where it appears in the line.
            Aaron P Scooter Software

            Comment


            • #7
              Thanks Aaron.

              Comment

              Working...
              X