smarter regex for goto def