in reply to Re^2: Abbreviation regex?
in thread Abbreviation regex?

Naturally... there are a number of downsides to this solution. The most obvious to me is overhead. If we are scanning a file, we need to recompile a trivial regex for each work. The substr solution above is much faster and safe from exploit.

I've seen it somewhere before. I don't know where, though. I think that it resides in the place for things that are idiomatic but not useful enough to be idioms.