As a Roblox developer, I would like to see some additional documentation for string captures.
I was trying to format a string and had no idea that “%1-9” were arguments I could use, until AI suggested it. I double checked the string pages and as far as I could tell, there was no mention of it, but to me it’s a critical feature for reformatting strings.
string.gsub(“Score100Lives50”, “(%a+)(%d+)”, "%1: %2 ") – "Score: 100 Lives: 50 "
I want to share this knowledge so other people can see how convenient it is to gsub to solve lots of trivial problems. I would love to see something like this as an example under the gsub entry of the strings page to showcase the usefulness of the ‘%1-9’.