> I should point out that the regular expression you used won't actually
> trim trailing whitespace from the reason.  The "(.*)" part is greedy so
> it'll grab all the stuff to the end of the line, including whitespace,
> leaving nothing for the "\s*" that comes after it.

You're right.  It was late last night, and I thought about that, but
decided it wasn't a big deal.  I explicitly didn't want to use the
non-greedy version to avoid backtracking.

I'm going to just remove the trailing \s*.  If someone puts trailing
whitespace on their error reason, who are we to remove it.  :)

See d6154ab945f7060c988816aa382f2b4dabb60b11

> Sorry, I'm just kind of obsessive about regular expressions, and my
> doctor won't prescribe anything for it.

This is a common disease.  It's just rare that people recognize it and
can put it to good use.

-R

Reply via email to