Hey guys. So I'm trying to write a script that replaces footnote citations in one format with footnote citations in another format.
For example, the text will read: "Then he went down the street.[1] That is where the police found him [2]. They immediately arrested him at the house. [3]"
And I would like the script to find the [ #] strings and replace them with {#} ... so that the string reads:
"Then he went down the street.{1} That is where the police found him {2}. They immediately arrested him at the house. {3}"
Note that there will be double, and even tripple, digit footnotes, so the script has to be able to recognize [##] or [###] and replace the brackets with {} accordingly.
I'm not really sure how to do this, since the "pattern" is constantly changing depending on the number between the brackets. Ideas?
Thanks!