That's still not a meaningful amount of code. For example, there's no context to indicate what currSect is.

And, since you're apparently trying to do something to a document based on its content via Find/Replace, it would also be helpful if you could attach a document to a post with some representative data (delete anything sensitive). You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.