garabik/grc

Replacing 1+ spaces after a colon infinite loop

sir-farfan opened this issue · 3 comments

Hello there
Thanks for this awesome tool, it's saved me a lot of sed-ing and vim syntax matching :)

I'm reducing the amount of blank spaces in live logs which looks like this

[52]       : CHECK_
into
[52] : CHECK_

I have tried a bunch of regex but them all result in an infinite loop such that I can't kill it with ctrl+c, I have to kill the processes

regexp=\s+:\s+
regexp=\s+: \s*
regexp=\ +:\ +
regexp=\ +: \ *

It's not too bad, "\s+: \s+" works for 95% of the lines, but it's interesting that I can't cover that case no matter what I try.

Am I writing the regex wrong?
Is this a bug in python or grc?

I'm in Debian/testing
grc/stable,now 1.11.3-1.1 all [installed]

This was indeed a bug in grc, fixed in ae79db5; or in Debian package since 1.12 - you can get 1.13 from unstable (should install just fine, there are no extra dependencies).

Here I though Debian / Testing would be using newer stuff : p
Thanks, I'll try to get the package from Sid.

Unfortunately, by mistake I did not do source-only upload and the package was removed from testing (and what's worse, I have not noticed it). I uploaded the new package now and it should migrate to testing in due time.... anyway, thanks for the bug report, otherwise who know when I would notice it.