Hi All
Today only i joined this group. need ur help.
Here goes my question:
Is there any simple way to match for a particular pattern ( with start and end delimitters) and extract the matched section?
I am doing it reading the contents line by line and setting the flags. But this logic is becoming complex, as i need to match and extract based on certain conditions.
for ex:
#ifdef X
some code
#endif
#ifdef Y
somecode
#ifdef Z
somemorecode
#else
code that does not match condition
#endif
#endif
---------------------------------
from the above text, i have to extract sections between #ifdef and #endif.( and ofcourse #else in some cases)
let me know for any further explanation about the same.
thanks in adv
Pramod
					Today only i joined this group. need ur help.
Here goes my question:
Is there any simple way to match for a particular pattern ( with start and end delimitters) and extract the matched section?
I am doing it reading the contents line by line and setting the flags. But this logic is becoming complex, as i need to match and extract based on certain conditions.
for ex:
#ifdef X
some code
#endif
#ifdef Y
somecode
#ifdef Z
somemorecode
#else
code that does not match condition
#endif
#endif
---------------------------------
from the above text, i have to extract sections between #ifdef and #endif.( and ofcourse #else in some cases)
let me know for any further explanation about the same.
thanks in adv
Pramod
Comment