Hi, this may sound dumb, but i'm just learning.

I am running regular expressions to pick out text and want to test for
the existence of any submatches within my matches collections. I have
tried many ways but just generate errors.

Any pointers

Regards

BP

Re: Help with Regular Expressions - submatches by Al

Al
Sat Dec 27 19:35:34 CST 2003


"Ben Pettit" <ben.pettit@blueyonder.co.uk> wrote in message
news:bptruvceh558mp1ba27hdhdcs4ulqldi6h@4ax.com...
> Hi, this may sound dumb, but i'm just learning.
>
> I am running regular expressions to pick out text and want to test for
> the existence of any submatches within my matches collections. I have
> tried many ways but just generate errors.
>
> Any pointers

Stop making mistakes is about all I can say based on the information you
have provided. Perhaps some of us could point out some of your mistakes, or
at least understand where it is you are going wrong if you showed some
actual code.

/Al



Re: Help with Regular Expressions - submatches by Han

Han
Sun Dec 28 04:09:47 CST 2003

One way is "test" method.

msgbox oRE.test(my_string)

You'll get true if the string has something the pattern points.

"Ben Pettit" <ben.pettit@blueyonder.co.uk> wrote in message
news:bptruvceh558mp1ba27hdhdcs4ulqldi6h@4ax.com...
> Hi, this may sound dumb, but i'm just learning.
>
> I am running regular expressions to pick out text and want to test for
> the existence of any submatches within my matches collections. I have
> tried many ways but just generate errors.
>
> Any pointers
>
> Regards
>
> BP



Re: Help with Regular Expressions - submatches by Ben

Ben
Sun Dec 28 05:02:30 CST 2003

Ok used this one :

If reMatch.submatches.count > 0 Then
WScript.Echo ("Submatch=" & reMatch.submatches (0))
End If


On Sat, 27 Dec 2003 21:29:54 +0000, Ben Pettit
<ben.pettit@blueyonder.co.uk> wrote:

>Hi, this may sound dumb, but i'm just learning.
>
>I am running regular expressions to pick out text and want to test for
>the existence of any submatches within my matches collections. I have
>tried many ways but just generate errors.
>
>Any pointers
>
>Regards
>
>BP