Results 1 to 5 of 5

Thread: Grammar rules

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    192

    Default 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 Images Attached Images

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,375

    Default

    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

  3. #3
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    192

    Default

    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 Images Attached Images

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,375

    Default

    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

  5. #5
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    192

    Default

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

Posting Permissions

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