franzmicquelini Posted December 14, 2007 Posted December 14, 2007 Hello! I need some help...i need to extract the 3rd segment of an ip adress into a variable, for example, from de ip 192.164.21.124 , e need to get the "21".... any suggesttion? Thank you
Amaruq Posted December 14, 2007 Posted December 14, 2007 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.
xzaz Posted December 14, 2007 Posted December 14, 2007 Stringsplit() Small Color Picker v0.2 | Travian bot
franzmicquelini Posted December 14, 2007 Author Posted December 14, 2007 (edited) 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 December 14, 2007 by franzmicquelini
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now