Announcement

Collapse
No announcement yet.

Ignore Time stamp in PDF

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

  • Ignore Time stamp in PDF

    Hi

    I am comparing PDF's and the file has a time stamp I.E 12:27 AM. Is there a way to ignore time stamps? I have added elements to ignore the month and day, but there are too many times to create rules for each one.

    Thanks

  • #2
    Hello,

    You would need to create a regular expression (Basic grammar type) that matches on any type of timestamp that may occur. Do they only occur at the beginning or end of a line? That would help greatly narrow down how to define the grammar.

    A basic grammar, that could match on any time anywhere in the file, would be:
    Code:
    \d+:\d\d [aA|pP][mM]
    We have a KB article and tutorial video, here:
    http://www.scootersoftware.com/suppo..._unimportantv3
    Last edited by Aaron; 10-May-2013, 04:50 PM. Reason: Update
    Aaron P Scooter Software

    Comment


    • #3
      Hi
      The basic grammar above worked. Thank you very much.
      The time stamp comes at the end. IE: Report generated 10-May-2013 12:27 AM. Is there a basic grammar to ignore when at the end of the line? It might come in handy in the future.

      Thanks

      Comment


      • #4
        Do you mean at the "end of the file"? There is not a grammar type to match on the last line of the file; it would need to be a RegEx that finds that specific type of string, ie:
        Code:
        ^\s*Report generated \d+-.+-\d+ \d+:\d\d [Aa|Pp][Mm]\s*$
        If it is the end of the line, that would require building in the $ character as part of the RegEx (which matches on end of line). The above example only finds that phrase if it is on its own line (^ is the beginning, $ is the end), and allows for optional whitespace \s* between the beginning and end of the line.
        Aaron P Scooter Software

        Comment

        Working...
        X