R Rajesh Gupta Member Licensed User Nov 2, 2018 #1 Hii All, I want to split IPAddress, I am using the following code but its not working. Please Help:- Dim IpadrressToSplit() As String = Regex.Split(".", 192.168.0.44) txtIP1.Text = IpadrressToSplit(0) txtIP2.Text = IpadrressToSplit(1) txtIP3.Text = IpadrressToSplit(2) txtIP4.Text = IpadrressToSplit(3)
Hii All, I want to split IPAddress, I am using the following code but its not working. Please Help:- Dim IpadrressToSplit() As String = Regex.Split(".", 192.168.0.44) txtIP1.Text = IpadrressToSplit(0) txtIP2.Text = IpadrressToSplit(1) txtIP3.Text = IpadrressToSplit(2) txtIP4.Text = IpadrressToSplit(3)
DonManfred Expert Licensed User Longtime User Nov 2, 2018 #2 The dot has a special meaning in regex. It must be escaped... B4X: Dim IpadrressToSplit() As String = Regex.Split("\.", "192.168.0.44") Log(IpadrressToSplit(0)) Log(IpadrressToSplit(1)) Log(IpadrressToSplit(2)) Log(IpadrressToSplit(3)) Upvote 0
The dot has a special meaning in regex. It must be escaped... B4X: Dim IpadrressToSplit() As String = Regex.Split("\.", "192.168.0.44") Log(IpadrressToSplit(0)) Log(IpadrressToSplit(1)) Log(IpadrressToSplit(2)) Log(IpadrressToSplit(3))
R Rajesh Gupta Member Licensed User Nov 2, 2018 #3 DonManfred said: The dot has a special meaning in regex. It must be escaped... B4X: Dim IpadrressToSplit() As String = Regex.Split("\.", "192.168.0.44") Log(IpadrressToSplit(0)) Log(IpadrressToSplit(1)) Log(IpadrressToSplit(2)) Log(IpadrressToSplit(3)) Click to expand... Thanks a lot !! Upvote 0
DonManfred said: The dot has a special meaning in regex. It must be escaped... B4X: Dim IpadrressToSplit() As String = Regex.Split("\.", "192.168.0.44") Log(IpadrressToSplit(0)) Log(IpadrressToSplit(1)) Log(IpadrressToSplit(2)) Log(IpadrressToSplit(3)) Click to expand... Thanks a lot !!
DonManfred Expert Licensed User Longtime User Nov 2, 2018 #4 Rajesh Gupta said: Thanks a lot !! Click to expand... you do not need to answer such a post. Clicking on LIKE on the helpful post is enough. Upvote 0
Rajesh Gupta said: Thanks a lot !! Click to expand... you do not need to answer such a post. Clicking on LIKE on the helpful post is enough.