I want to read a text file which has text as follows(sample)
abc ip-32-56-198-18.com xyz
now the text 32-56-198-18
updates dynamically and now i want to take this text and create ip address for further use.
I have done this using PHP but with ant i am in problem as I cant get the position of specific sub-string like php in ant.
I have seen this question its similar but he knows the position of the sub-string my position is too not fix as abc
can be string of any length. Only ip-
and .com
are fix which are sufficient to find the required.
If you all say that its not possible using ant then i can focus or do something else or try different method to fix my problem dropping the plan of reading the same from ANT.
Thanks to all.
Update: abc ip-23-56-89-45.com-asdhba.sip-65-59-85-12.com xyz
for the above example the code should work and it should give me 23-56-89-45
Thanks.