Jump to content
Sign in to follow this  
franzmicquelini

How to get a segment from an Ip adress?

Recommended Posts

Try with: StringSplit ( "string", "delimiters" [, flag ] )

This returns an array, the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) contain the delimited strings.

$array = StringSplit("ip",".")

$array[3] would be 3rd segment.

Share this post


Link to post
Share on other sites

Try with: StringSplit ( "string", "delimiters" [, flag ] )

This returns an array, the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) contain the delimited strings.

$array = StringSplit("ip",".")

$array[3] would be 3rd segment.

It's done;) Thanks!!! :)

----------------------------------------------------------

$IP= "192.168.67.1"

$Segment= StringSplit($IP, ".")

MsgBox(0, "The 3rd segment is:", $segment[3])

----------------------------------------------------------

Edited by franzmicquelini

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...