S
siddharthkhare
Hi All,
I need to parse certain text from a paragraph (like 20 lines).
I know the exact tags that I am looking for.
my approach is to define a xml (config) file that defines what tag I am
looking for and corresponding regular expression to search for the
pattern.
Xml file will also have a way to say what should be the pervious tag
and what should be the next tag. Again some of it through regular
expression and some of it through logic.
Run time just read the xml .find each tag and corresponding regular
expression execute it.
Assuming there may be more additions of the patterns and there might be
more rules coming up , Is this the best approach for this.
Are there other ways to make it more flexible and generic.
I don't want to end with stringent rules rather develop some sort of
extendable grammar.
Any Ideas
-KS
I need to parse certain text from a paragraph (like 20 lines).
I know the exact tags that I am looking for.
my approach is to define a xml (config) file that defines what tag I am
looking for and corresponding regular expression to search for the
pattern.
Xml file will also have a way to say what should be the pervious tag
and what should be the next tag. Again some of it through regular
expression and some of it through logic.
Run time just read the xml .find each tag and corresponding regular
expression execute it.
Assuming there may be more additions of the patterns and there might be
more rules coming up , Is this the best approach for this.
Are there other ways to make it more flexible and generic.
I don't want to end with stringent rules rather develop some sort of
extendable grammar.
Any Ideas
-KS