techknight Well-Known Member Licensed User Longtime User Sep 21, 2021 #1 Does anyone have an example on how to inspect the input of a dialogbox for an IP Address properly inputted? Making sure there are the proper periods in the proper locations, whether it has numbers and not letters, etc... any thoughts? Thanks.
Does anyone have an example on how to inspect the input of a dialogbox for an IP Address properly inputted? Making sure there are the proper periods in the proper locations, whether it has numbers and not letters, etc... any thoughts? Thanks.
DonManfred Expert Licensed User Longtime User Sep 21, 2021 #2 Regex? ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$ Click to expand... or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html Upvote 1
Regex? ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$ Click to expand... or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
techknight Well-Known Member Licensed User Longtime User Sep 21, 2021 #3 DonManfred said: Regex? or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html Click to expand... Yeah, i was thinking regex would be the way to go with that. Upvote 0
DonManfred said: Regex? or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html Click to expand... Yeah, i was thinking regex would be the way to go with that.
techknight Well-Known Member Licensed User Longtime User Sep 21, 2021 #4 DonManfred said: Regex? or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html Click to expand... Which regex function would I use with this in B4A? Upvote 0
DonManfred said: Regex? or more complete B4X: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Based on: https://www.oreilly.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html Click to expand... Which regex function would I use with this in B4A?
DonManfred Expert Licensed User Longtime User Sep 21, 2021 #5 There is only one REGEX. At least i only know this one. Upvote 0
techknight Well-Known Member Licensed User Longtime User Sep 21, 2021 #6 DonManfred said: There is only one REGEX. At least i only know this one. Click to expand... Yeah but i didnt know what subfunction of Regex to use. Anyways... I figured it out. Thanks. Upvote 0
DonManfred said: There is only one REGEX. At least i only know this one. Click to expand... Yeah but i didnt know what subfunction of Regex to use. Anyways... I figured it out. Thanks.