I am new in Java (some experience but not essential) and I am trying to build a small app that will do the following: Lets say that I have a list of names in a .txt file like the following:
nick
george
john
What I want to do now is to process each line depending on the letter the name ends. So for example the name "nick" ending in a K will be processed in a certain way. The same goes for the rest of the entries. Then I want to write onto a new file with the original entries in the first column and the processed names next to the original ones in the same line like the following:
nick nick's nicolas
george george's giorgio
john john's johnny
As I understand I will have to process each line match the regex for that name and write the entry with its variants in the new file. Then the next line etc... The problem is that while trying to find some stuff online I got really confused and lost.
Any help will be more than welcome!
Regards.
nick