I have a variable like this:
var = "word1 (should be replaced by word1)"
I need to get word1 by itself and sometimes it may be a word(s) but it will always have (*) after it. Any way to delete text between the () signs, then remove the (), then remove any space(s) after the last word?
Not sure of any way to go about it.
The simplest would be:
InStrreturns the index of the first occurrance of “(“. I subtract 1 to discount the position held by the “(“.Midcuts the string from the first character at position 1, to the index returned by theInStr.Then
Trimto remove trailing spaces.