I am trying to find in a huge COBOL file if all the "IF" have a corresponding "END-IF". Using Visual Studio 2008 as I know it has a search tool with a regex feature. (Though, I know after reading Jeff Atwood s article about it, that the regex in Visual Studio are not quite the same than the real deal.)
Anyway, I came up with this expression:
<(IF)#(.*
*)#END-IF
That seems to overflow the stack, quite inconveniently (see picture below). So I was wondering, if it was at all possible to do this kind of search in VS ? And if it is, what would the regex look like ?
-->I want to know if all "IF" have a closing "END-IF"
感谢。