Cached trim regex