Regex to find nested if statements
Posted: Thu Aug 27, 2009 6:05 pm
Hello
I need to do a regular expression to find two nested if statement(GROUP1), but not to be confused with GROUP2 of the following example:
GROUP1
if condition
line_1 statement
line_2 statement
.
line_n statement
if condition
line_1 statement
...
line_n statement
end if
line_1 statement
...
line_n statement
end if
GROUP2
if condition
line_1 statement
...
line_n statement
end if
line_1 statement
...
line_n statement
if condition
line_1 statement
....
line_n statement
end if
how can I do?
thanks
I need to do a regular expression to find two nested if statement(GROUP1), but not to be confused with GROUP2 of the following example:
GROUP1
if condition
line_1 statement
line_2 statement
.
line_n statement
if condition
line_1 statement
...
line_n statement
end if
line_1 statement
...
line_n statement
end if
GROUP2
if condition
line_1 statement
...
line_n statement
end if
line_1 statement
...
line_n statement
if condition
line_1 statement
....
line_n statement
end if
how can I do?
thanks