I have a column of text. The text may contain the string "var[1]" where 1 can be any number. I would like to increment the number inside the brackets. So if my first row of this column contained text that looked like:
Some text followed by var[1] which has other text followed by var[0] and lastly var[2]
My new value would be
Some text followed by var[2] which has other text followed by var[1] and lastly var[3]
I assume it's going to require an update with a replace like this question. Update a column value, replacing part of a string
I'm just not sure how to use a regex to find and increment the number.