These lines are in the format: code, cure name, quantity, price, date.
Now what I need is when the user, say, enters a certain number of cures, that quantity is increased or decreased, depending on the chosen option. And THIS is not the problem, because I can write the functions for these things.
What I DO have the problem with is the extraction of a third and fourth substring from a line. I'd then convert these numeric strings to int values so I could operate on them. Then, I'd need to change the line.