                              # comment, preceded by a
                                            # consumed newline and whitespace
                 |
                 (?=\${)      # an expression
                 |
                 (?=</?%)  # a substitution or block or call start or end
                              # - don't consume
                 |
                 (\\\r?\n)    # an escaped newline  - throw away
                 |
                 \Z           # end of string
                )r
