Welcome! Log In Create A New Profile

Advanced

[WD23] - Testing for IP Address

Posted by JP 
JP
[WD23] - Testing for IP Address
October 20, 2018 01:31PM
Hi All

Is there a built-in WD function for testing if a string contains an IP address and nothing but an IP address (in the format NNN.NNN.NNN.NNN) ? I have written my own function but just checking to see if there was something already built-in.

Thanks
Re: [WD23] - Testing for IP Address
October 20, 2018 01:51PM
Hi JP

AFAIK, no, there isn't

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: [WD23] - Testing for IP Address
October 20, 2018 01:56PM
Hi JP,
you could use, MatchRegularExpression.
Just note that in WB Browser code it uses the syntax from Javascript.

take a look here: [www.regular-expressions.info]


Regards
Steven Sitas
JP
Re: [WD23] - Testing for IP Address
October 20, 2018 09:02PM
Thanks Steven.
JP
Re: [WD23] - Testing for IP Address
October 20, 2018 09:03PM
Thanks Fabrice. I have written a simple routine to do it for me.

Cheers!
Re: [WD23] - Testing for IP Address
October 21, 2018 11:11AM
Hi JP, I just do a ping to that IP address. If I can't get a response then something's not OK and I let it know the user. Same goes for the second part of e-Mail-addresses. If a ping fails then the input is propably wrong.

BR G. Predl
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: