This has me scratching my head for the past hour or so and I've decided to ask for some input and maybe find out what I'm missing.
The point of the script is to convert some IRC logs from one format (bip) to another (Energymech), and to do that I need to make a small regex substitution: I need to change everything between ! and : (them included) to >.
Now, I know I can do this using
(the string is just an example), and if I do that in the python interpreter it gives the correct output, but when I do it in my code it just ignores it for whatever reason.
The code I'm using and a sample log is here.
I'm just stuck right now and to say that it's frustrating would be an understatement.
The point of the script is to convert some IRC logs from one format (bip) to another (Energymech), and to do that I need to make a small regex substitution: I need to change everything between ! and : (them included) to >.
Now, I know I can do this using
Code:
re.sub(r'\!.*?\:', '>', 'test !sx: asd)
The code I'm using and a sample log is here.
I'm just stuck right now and to say that it's frustrating would be an understatement.