View Single Post
 
Old 02-10-2016, 04:12 AM
PRA007's Avatar
PRA007 PRA007 is offline Windows 7 64bit Office 2010 32bit
Competent Performer
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default Find sub-strings in String.

Earlier I was doing things differently but after this answer https://www.msofficeforums.com/word-...ng-string.html I get an Idea that is outlined here.


I am getting StrTxt as string after httpreq response text.

Now I want to find each Substring in StrTxt using regex.

Code:
Set re = New RegExp
re.Pattern    = "pattern"
re.Global     = True
re.IgnoreCase = True  'if required

For Each m In re.Execute(StrTxt)
  Msgbox m
  'run another function for each substring.
Next
How to do this? I mean I know that for each control must be variant or object but I don't know how to do this.

Last edited by PRA007; 02-10-2016 at 10:55 AM.
Reply With Quote