in reply to Re: New to RegEx... need translation
in thread New to RegEx... need translation

VBScript does have a regexp object. It's pretty weak, but it should be enough for this (not using my one-regexp solutions though ;-)

This is how it could be in VB. VBScript will be almost the same. I'll black this out so that the innocent Perl guys are not affected:
Private Function IsWeak(str As String) As Boolean Dim re As VBScript_RegExp_55.RegExp Set re = New VBScript_RegExp_55.RegExp IsWeak = True re.Pattern = "[a-z]" If Not re.Test(str) Then Exit Function re.Pattern = "[A-Z]" If Not re.Test(str) Then Exit Function re.Pattern = "[0-9]" If Not re.Test(str) Then Exit Function re.Pattern = "[;,.#!\$]" If Not re.Test(str) Then Exit Function IsWeak = False End Function
Bleargh ......o...o.oo......oo.....oo...oooo..o..o.......

Jenda
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
   -- Rick Osborne

Edit by castaway: Closed small tag in signature

Replies are listed 'Best First'.
Re^3: New to RegEx... need translation
by LAI (Hermit) on Apr 17, 2003 at 20:38 UTC

    NO!

    NO! Take it away! It burns ussss! Oh, How it burnssss!

    Okay, I'll stop now :o)

    LAI

    __END__