Content Type
Profiles
Forums
Events
Posts posted by wolfh3art
-
-
hi,
Could someone help me discover the RegExp for KB1234567.exe
I want to check if the first 2 chars are "KB", the following 6 chars are between [0-9] and the last four are ".exe".
I only discovery how to check in the beginning or in the end, i don't know how to make the 3 conditions.
Sorry my english,
thanks
0 -
Just one question: Why??
I think i can awnser this one.... Just FOR FUN!!!!
0
VbScript RegExp Question
in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Posted
thanks to all for the examples, this is what i was looking for ("kb[0-9]{6}.exe").
I was using complex syntax and vbscript also uses simple... like this one.
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.Pattern = "kb[0-9]{6}.exe"
objRegExp.IgnoreCase = False
Dim strVariable
'strVariable = "kb987653.exe"
strVariable = "kb98763.exe"
If objRegExp.Test( strVariable ) Then
wscript.echo "Correct File"
else
wscript.echo "InCorrect File"
End If