Searching for text?

N

newman

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
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top