Grammar rules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misi01
    Old Hand
    • Jun 2005
    • 210

    Grammar rules

    I'm trying to define grammar rules for a log file. I've attached an example of how the file could look below.

    Basically, I want to be able to mark all lines in the files that either start with
    ROUTER SEND
    or
    Elapsed Time
    as being unimportant and to be ignored.

    I defined my first attempt as a regular expression
    XDB Trace=Text matching ^ROUTER SEND
    .

    I also selected Session, session settings and the importance tab and UNmarked the XDB Trace grammar element.

    Based on what I read in the online help, I imagine this would tell BC that I want to mark ANY lines starting with ROUTER SEND as being unimportant, but that's not what I'm seeing. What am I doing wrong ???
    Attached Files
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    For the Grammar type, did you pick Delimited FROM:
    ^ROUTER SEND
    to
    End of Line

    Otherwise, the Basic grammar type would be for the specific defined text (ROUTER SEND) but not the following text.
    Aaron P Scooter Software

    Comment

    • misi01
      Old Hand
      • Jun 2005
      • 210

      #3
      Still not getting the expected results. Have attached a screen shot showing my settings.. Session, session settings does have the XDB Trace unmarked. What am I missing?
      Attached Files

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16002

        #4
        Hello,

        Here you have used $ as the End of Line but didn't enable Regular Expressions, so it is searching for the literal text "$". I'd suggest leaving the "To" text box blank, and instead use the checkbox below "Stop at End of Line", so:

        From: ROUTER SEND
        To: (blank)
        Enable "Stop at end of line"
        Aaron P Scooter Software

        Comment

        • misi01
          Old Hand
          • Jun 2005
          • 210

          #5
          Thanks, now that I understand what to do, I've got it working as expected.

          Comment

          Working...