Fixes #6253 updated regex to properly respect heredoc

Added negative lookahead to properly ignore heredocs with formatting.