OsakaWebbie
Programmer
I need to do a little task that would be simple with "regular expressions" (those of you with a C or Perl background would know what I mean), but as far as I can tell, that functionality is not in VBA as such. If I'm wrong, please tell me, and that will solve my challenge.
The situation: I am processing Powerpoint slide titles for use elsewhere, and some of them end with "(1 of 3)" or something like that, and in that case I want to strip that off. But there might be something else in parentheses before it, so a simple InStr(1,str,"(") is risky. The format of the unwanted stuff will always be "(# of #)", making me yearn for R.E., but with my limited knowledge of VBA, the only way I can think of to do this is to use InStr to look for "(", then "of", then ")", and if found, somehow (I'm not sure how yet) check to see if the stuff in between is numeric. Is there an easier way?
The situation: I am processing Powerpoint slide titles for use elsewhere, and some of them end with "(1 of 3)" or something like that, and in that case I want to strip that off. But there might be something else in parentheses before it, so a simple InStr(1,str,"(") is risky. The format of the unwanted stuff will always be "(# of #)", making me yearn for R.E., but with my limited knowledge of VBA, the only way I can think of to do this is to use InStr to look for "(", then "of", then ")", and if found, somehow (I'm not sure how yet) check to see if the stuff in between is numeric. Is there an easier way?