Forum Discussion
farhadfarzi
Mar 16, 2023Copper Contributor
find and replace some words that are only used inside parentheses
Hi. I have a file that i need to find and replace some words that are only used inside parentheses. the problem is the words that i want to replace are used in every part of the text but i only need to replace the ones that are inside parentheses.
for example:
in this scenario, i need to change you that is used in parentheses and not in other places.
I would be grateful if you could help me out.
in this scenario, i need to change you that is used in parentheses and not in other places.
I would be grateful if you could help me out.
farhadfarzi You have not indicated in what way you want to change the word(s) in parentheses.
However, using Visual Basic, you would do a Wildcard search of \(*\) which will result in the strings in parentheses being selected and the you could use the Instr() function to determine if the word that is to be changed is contained within the string between the parentheses and if it is, make the necessary changes before moving on to the next string within parentheses.
Post back with full details of the requirement if you want some working code.