[format] cache indexes to pcre named captures