I don’t know how to use the “replace” python string function to remove brackets.
i assume i’m doing something wrong here – i have this code:
line = line.replace('\(','A')
which, when faced with a string that has a ( in it doesn’t do anything. I’ve also tried
line = line.replace('\\(','A')
but no dice there either.
I know that the function works – (this is for converting sqlite data dump to mysql and seriously why hasn’t someone made a $10 app to do this? I would have bought it by now.) – because i can do
line = line.replace('CREATE','A')
and i get all the create statements replaced by the letter A…
What am i missing here?
Don’t escape it?
str.replacedoesn’t use regular expressions. That’s what there.subfunction does.