in reply to Re^2: Is there a way to make these two regex lines cleaner?
in thread Is there a way to make these two regex lines cleaner?

I've been putting '-' at the end for a very long time (probably decades) and have never encountered the scenario you describe; however, I'm not averse to a bit of defensive programming. :-)

Update: The remainder of what I originally wrote is just wrong: I'll put it down to an idiotic brain fart. I've stricken it and, because it was quite long, removed it to a spoiler.

— Ken