◐ Shell
clean mode source ↗

Message 175112 - Python tracker

This is a known issue: there are a good few duplicates in the tracker.  Issue #1662581 is one, for example.

In this particular case, you can probably fix things by tightening up your regex.  Part of the problem is that '.*' is going to match any sequence of characters, including spaces.  Judicious use of '\S' to match non-whitespace characters might help. There's not much point to the '?' in  '.*?', either.