Forum Discussion

mustak_m's avatar
mustak_m
Occasional Contributor
12 years ago
Solved

RegExp.Execute method

I am using following snippet to get the matching string. Sub ExtractDemo Dim InStr, regEx     InStr = "Description:" &_   "Handles all actions supported " &_  "Input Para...
  • HKosova's avatar
    12 years ago
    Hi Mustak,



    By default, * is greedy, that is, matches the longest string possible. Try this instead:



    regEx.Pattern = "Des.*?n"



    regEx.Pattern = "oIn.*?n"