Ask Your Question
0

What is the equivalvent of InStr for using regular expressions

asked 2020-10-17 18:51:56 +0100

mapurves123 gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-10-19 00:28:28 +0100

mgl gravatar image

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

edit flag offensive delete link more

Comments

Thank you, Michel. That's just what I needed. Searching sheets and cells I could do, but not in a text string.

mapurves123 gravatar imagemapurves123 ( 2020-10-20 01:34:55 +0100 )edit

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

mgl gravatar imagemgl ( 2020-10-20 09:59:27 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-10-17 18:51:56 +0100

Seen: 33 times

Last updated: Oct 19