slightly more efficient regex