I have a large string having dates, Ip addresses etc.. I need to split the content with date and did that with
[0-9]+[/.-])([0-9]+[/.-][0-9]+
But it also split using the IP addresses.
What the only difference between date and IP address is date have 3 numbers and Ip have 4 numbers like 28.06.2012 and 178.15.16.314. How can I omit the IP address from splitting the content?
Sorry. One more thing i forgot to add. That is there are other possibilities for the format of date like 25-06-12, 2012-06-25, 12-06-25.
First of all, the dates have four numbers representing the year. Second, an IP address has four octets. So the following should do the trick (not tested):
Tested: