Is there any way that you can remove IPs from a string?
The input file we get sometimes has IPs attached to the user name, e.g.
Jan vd Merwe Piet Breedt (172.166.23.41) Jan vd Merwe (164.23.23.51) Sarel Fourie (23.12.167.244) Piet Breedt
So if there is an IP, I want to remove it. I have been looking at alot of functions but cant seem to get the indexing and parameters right.
Use String.replace():
Of course, the regex could be specialised to only match ips, something like
EDIT
Here’s how you would replace the lines in the files (pseudocode):