I got data with latitude and longitude, if they are unknown it's -1 for lat and -1 for long and then i get the correct location. After that i want to store the file again with the correct lat and long to avoid a daily query limit. However for the purpose of learning and efficiency i don't want to do it like
id+"\t"+region+"\t"+ etc...
This is how the lines look like:
5 Canada British Colombia Vancouver -1 -1
I'm guessing it must be possible with
lines[i].replaceAll("regex", lat);
lines[i].replaceAll("regex", lon);
or maybe even in one line.
What should the regex be?