RegExp matching unterminated ActionScript lines (semicolon)

Today I had the dreaded “1131: Internal build error” in Flash Builder coupled with the “Classes must not be nested error” despite no classes actually being nested. Googling around, I found a few posts that provide some tips towards a solution. The most frequent two of which are empty switch statements and ActionScript lines that are not properly terminated with a semicolon. The project in questing uses over 100 classes, so I decided to create a RegExp for use in “Find In Files” to search for lines that were not properly terminated.
As an extra caveat, many types of lines in programming are not supposed to be terminated, so the RegExp is quite long and I have not been able to test it any more than the said 100-class project I’m working on.
NOTE: This might macth some multiline ASDoc comments, empty lines and method argument lists spanning multiple lines as well.
(?sim)(?<!/\*)^\t*((?!\{|\}|@)(?!function|import|class|embed|SWF|if|else|switch|case|while|for|event|try|catch|finally|package|default|//|/\*|\*/)[^;])+$(?!.*\*/)Here are the posts I found:
- flex’d: “Internal Build Error” or “Classes Must Not Be Nested” error
- Inside RIA: Fixed: “An internal build error has occurred” with FB3 & Galileo
- Tink: An internal build error has occurred (switch statement)
- Michael Imhoff: Internal Build Error
- judah’s blog: Internal Build Error
EDIT: Added “default” to the RegExp. If anyone has any improvements to this, please let me know. Especially on how to make it not match so many empty lines.