I saw that you accepted the answer, but actually this situation almost never happens in a real application. You should try to avoid mixing patterns with other data.
If you have a line like this: x=foo=&bar=asd%20yolo%20123-1512 and you want to add part of the identifier to it using string.format , you should use something like this:
s = "x=foo=&bar=asd%20yolo%20123-1512" ID = 12345 string.format("id=%d&%s", ID, s)
(Note: I used %d because your identifier is a number, so in this case it is preferable to %s .)
source share