tags:

views:

15

answers:

1

Hi I want to write application which does following

  1. Allow customer to create rule to search particular string

  2. allow customer to specify Start and end delimiter and search a string in those delimiter

  3. allow customer to specify one string and wait for another string for say 10 minutes.

Any idea how to design this application. I came up with line by line reading and then applying those rules .

A: 

Whatever options you give them are going to end up as a Regular Expression -- can you just let them construct their own? That would solve 1 and 2.

Edited to add:

Log files are generally line-oriented, and of unlimited size; therefore you should read through the file one line at a time, testing against the regular expression.

egrunin
should my application read a file line by line or full file
Avinash