It sounds like you are confusing two different processes: one which writes to TextCtrl, and one which saves and manipulates strings. You should separate out these two processes in GUI design, for your own sanity.
My suggestion would be to save a list of files processed to a list at the same time as you append the file to the TextCtrl. You can then do manipulations on that list very easily using list comprehensions and the re
module. All this added manipulation will keep the text in your TextCtrl widget undisturbed, the way the wxPython gods intended.
I can provide some clearer examples if you can provide some code that shows what you are doing.