Hi.
Well, you willl find the tools to do that in the manual, with examples.
If you have questions I think you are welcome to post them here.
The sections covering what you need are "file functions" to access, open and save the content, "array" and "string" functions to work with it, respecively analyse and order the input.
And the general sections of course.
As I said, many people will like to help you, but first you will have to try for yourself.
🙂
jakob