don't know if regular expressions fit here...

just some n00bish question...
if i have for example the following text:
Value1: 111
Value2: 222
Value3: 333

i want to get the value of Value2. is there a way to get ONLY the value (in this case "222") without the "Value2: " in just 1 expression?
as i do it now, it would require at least 2 expressions (depending on the initial text, here it's a simple case).
enno if i do this expression: Value2: [0-9]*
it would return the whole line and not just the value, so i would need to do a second expression on the result to extract only the value...
so any way to do it with just 1 expression? like i want to match "Value2: [0-9]*" but i just want it to return the [0-9]*
Grouping.

\S+\s([0-9]*)
stupid me :P
i was testing in RegexBuddy, and the use of groupings has no effect in the "Match" method so i thought there could be another way to do it without grouping. grouping in regexbuddy seems only useful in the "Replace" thinggie. But in VBS it's fine, we can use the SubMatches method to return the matches of the different groups :D
taaaaaaaanx


well, here it is:
would show in 1st message box "lebgeeks" and in a 2nd one "battikh" based on the string "blablabla lebgeeks blablabla battikh blablabla"
so simple...
pattern="(lebgeeks).*(battikh)"
text="blablabla lebgeeks blablabla battikh blablabla"

Set regEx = New RegExp
regEx.Pattern = pattern
Set Matches = regEx.Execute(text)

MsgBox(Matches(0).SubMatches(0))
MsgBox(Matches(0).SubMatches(1))
I've had .* act up on different platforms. But its rare, so watch out.
yeah, it does act differently based on the regex flavor you're using. coz in some flavors, the "." matches the line break by default and in others it doesn't
for example JGSoft's dot matches line breaks, while java and VBS don't...
that's where regexbuddy comes handy, you can test using different engines with just 1 click

but i think that as long as it's the same programing language it should be fine...
but anyways, i'll be careful... thx for the warning :D