Extract method for analyzing expressions