Searching for text?

  • Thread starter Thread starter newman
  • Start date Start date
Ron said:
You're welcome. Let me know.
--ron

The routine works ok, in fact too well. It it outputs more than I need.

Can it be filtered to output certain stings in the quotation marks.
i.e. only strings beginning with the 4 designated letters PART

"partxxxxxxxxxxxxxxx"

Regards
 
The routine works ok, in fact too well. It it outputs more than I need.

Can it be filtered to output certain stings in the quotation marks.
i.e. only strings beginning with the 4 designated letters PART

"partxxxxxxxxxxxxxxx"

Regards

That's merely a matter of changing sPattern and probably, based on your
example, setting ignorecase to TRUE.

e.g.

Const sPattern As String = """(PART[^""]+)"""

and below

Set oRegex = CreateObject("VBScript.Regexp")
With oRegex
.Global = True
.Pattern = sPattern
.IgnoreCase = True
End With


--ron
 
Back
Top