VB script

By 2rajesh.b ·

I have a string
String s1 = "IP> and IP<";
String s2 = "";

how to write a VB script to search my string s2 is in the range of s1.

as i am completely new to VB please help me out in solving my problem.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Well you've made this difficult for yourself

by Tony Hopkinson In reply to VB script

First thing to do is rationalise s1
s1min = ""
s1Max = ""

Then you need to use the split function

IPMin = Split(s1Min,".")

Will give you and array of strings "10", "10","1","1"

So after you've split the others it's just a a lot of if statements
if IPS2{0) >= IPMin(0)....

Related Discussions

Related Forums