# Infinite loop in email\_reply\_trimmer

**URL:** <https://meta.discourse.org/t/infinite-loop-in-email-reply-trimmer/69427>\
**Category:** Development\
**Created:** [September 5, 2017, 8:06pm UTC](https://meta.discourse.org/t/infinite-loop-in-email-reply-trimmer/69427 "2017-09-05T20:06:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [September 12, 2017, 4:31pm UTC](https://meta.discourse.org/t/infinite-loop-in-email-reply-trimmer/69427/6 "2017-09-12T16:31:01Z")

</div>

Not sure about the “MIME-encoded email”, but at least I can reproduce the problem in `EmailReplyTrimmer`. ~~I’ll fix it tomorrow.~~ This is now fixed.

> <https://github.com/discourse/email_reply_trimmer/pull/12>
>
> The \`\[\\s\\S\]\` was causing problems (the matching could take forever) when none of… the backreferenced words (e.g. \`Am|schrieben\\sSie\`) was found.
> 
> I replaced it with \`.\` and the \`/m\` option and added a test.
> 
> @ZogStriP Can we release a new version if this is fine?

---

_[View the full topic](https://meta.discourse.org/t/infinite-loop-in-email-reply-trimmer/69427)._
