Speed up by avoiding repeated regex construction etc
Speed up by avoiding repeated regex construction etc

Avoid repeated regexp allocation, `slice`, `trim` and `toLowerCase`
calls.

wincent/hextrapolate,wincent/hextrapolate,wincent/hextrapolate