I have a basic macro which contains:
Found = InStr(MyText, SubStr)
I would like to have the equivalent of InStr which uses regular expressions:
Found = InStr(MyText, Regex)
Where Regex is a regular expression.
I have a basic macro which contains:
Found = InStr(MyText, SubStr)
I would like to have the equivalent of InStr which uses regular expressions:
Found = InStr(MyText, Regex)
Where Regex is a regular expression.
Hello @mapuves123
Sorry that you had to ask twice the same question before someone replies to you. I closed the second one because my answer was not applicable to macros.
Did you have a look to the API documentation? Look for SearchAlgorithms and REGEXP.
I found some examples : one in English and another one in French
I not able to help you more than this.
Kind regards, Michel
Thank you, Michel. That’s just what I needed. Searching sheets and cells I could do, but not in a text string.
Hello @mapuves123
Happy to hear you have found a solution.
To show this to the community, please tick the round mark on the top left of the answer.
Kind regards, Michel