Find and Replace with ignore variable or if/then

I have a find and replace script that works well for the most part. Our office has decide to not put “.” at the end of abbreviations and the script I have does the job but it also removes the periods at the end of sentences. Is there a way to add a variable that would ignore periods at the end of sentences? Something else I would like to do is be able to run the script and it looks at all of the drafting views within a folder.

Find & Replace Text.dyn (18.0 KB)

How would you differentiate an acronym and a word at the end of a sentence? What if the acronym is at the end of the sentence? These are the kinds of questions you need to ask yourself.

You could try checking to see if a word is in all caps, but I’m guessing all your notes are already capitalized. This also means you wouldn’t be able to check for a capitalized letter at the beginning of a sentence. Now you’re trying to determine what’s a word and what’s not and that becomes way more complicated. You might be better off providing a list of acronyms and parsing your text for those strings specifically.

1 Like