VB script
Hi
I have a string
String s1 = "IP>10.10.1.1 and IP<10.10.1.10";
String s2 = "10.10.1.7";
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.
Web Development
Hi
I have a string
String s1 = "IP>10.10.1.1 and IP<10.10.1.10";
String s2 = "10.10.1.7";
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.
by 2rajesh.b Accepted solution
by tony hopkinson Accepted solution
First thing to do is rationalise s1
s1min = "10.10.1.1"
s1Max = "10.10.1.10"
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)....
This discussion is closed to new replies.
Sort by Trending