Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:10:10+00:00 2026-06-10T20:10:10+00:00

my regex match in VBA (WORD) only gives one result. I created this function

  • 0

my regex match in VBA (WORD) only gives one result.

I created this function

Function RE6(strData As String) As String

    Dim RE As Object, REMatches As Object
    Set RE = CreateObject("vbscript.regexp")
    With RE
        .MultiLine = False
        .Global = False
        .IgnoreCase = True
        .Pattern = "\[substep [a-zA-Z]\](.*?); {1}"
    End With

    Set REMatches = RE.Execute(strData)

    RE6 = ""


End Function

The problem here is that it only gives the first result. For example I got a string:

[step 1] title for substeps;  [substep a] step a; [substep b] step b; [substep c] step c; 

My result is:

[substep a] step a;

only 1 match, not the step b and c.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:10:12+00:00Added an answer on June 10, 2026 at 8:10 pm

    You need to set Global to True

    http://msdn.microsoft.com/en-us/library/tdte5kwf%28v=vs.84%29

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this string matchString = Regex.Match(sometext, <img.+?src=[\'](.+?)[\'].+?>, RegexOptions.IgnoreCase).Groups[1].Value; to get an images src.
assuming we have this regex: preg_match('/\b(xbox|xbox360|360|pc|ps3|wii)\b/i' , $string, $matches); now, whenever the regex match
This javascript code: var regex = /(?<=<img src=).*?(?=)/gm; var src = regex.match(str); Gives me
Does this vim regex match only correct JSON strings? Does it match every correct
I've created the following regex pattern in an attempt to match a string 6
I have created the following to expose some data as a regex match string
When I do this: var m = Regex.Match(aabbccddeeff, [0-9a-fA-F]{6}); I get only aabbcc as
I would like to regex match a sequence of bytes when the string '02
I am trying to do this regex match and replace but not able to
Possible Duplicate: RegEx match open tags except XHTML self-contained tags I have this list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.