I am using the code by written by Borje Hagsten to ReplaceAll. It works very well. The link to the code is found at:
I have been trying to figure out what I need to do to modify the code to replace the first instance of the word only. I added an argument:
occurrence = 0 replace all instances
occurrence = 1 replace first instance
The problem is I cannot figure out where to stop after the first occurrence, do the replace and exit.
I hope that someone can take a look at the code and help me.
Thanks,
Spencer
I have been trying to figure out what I need to do to modify the code to replace the first instance of the word only. I added an argument:
occurrence = 0 replace all instances
occurrence = 1 replace first instance
The problem is I cannot figure out where to stop after the first occurrence, do the replace and exit.
I hope that someone can take a look at the code and help me.
Thanks,
Spencer
Comment