Reply

how to substring Ipaddress

[ Edited ]
Authority
Posts: 19
294     0

Hello Netzis,

 

Can anybody help in substringing

 

I have endup with

Dim urli = "https://ipman/wapi/v2.6.1/" + propertyValue + "?_function=next_available_ip&num=1"

(propertyvalue="_ref")

 

Dim ipaddress = rest.invoke("POST", urli, Nothing, Nothing, "")

 

ipaddress= "{""ips"": [""149.203.16.25""]}"

 

How can i get only "149.203.16.25" ? I tried all sorts of substring. That double quotes never leaves !

 

Which make the body as follows :

 

{{
"name": "abinep-74625.test.com",
"ipv4addrs": [
{
"ipv4addr": "[\"143.203.256.25\"]}",
"mac": "8c:87:a5:60:f1:b8"
}
]
}}

 

"ipv4addr": "[\"143.203.256.25\"]}"--> how to convert this to "ipv4addr" :"143.203.256.25"

 

Thank you

Re: how to substring Ipaddress

Authority
Posts: 19
295     0

Found answer Smiley Happy thanks

Re: how to substring Ipaddress

[ Edited ]
amzounslide
Techie
Posts: 4
295     0

The only suggestion I have is to use Int16.TryParse instead of Convert, in case the user enters non-numeric values. If the values are non numeric, TryParse will return false, whereas Convert, I believe, will fail (exception).

 

 

 

 

 

 

 

 

 

https://appsync.biz/dafont/ , https://showbox.bio/ , https://www.oovoo.onl/adam4adam/

Showing results for 
Search instead for 
Do you mean 

Recommended for You