regular expression tradeoff