avoid slicing, just store and use result from RegExp.exec