I need some help with a regular expression in python.
I have a string like this:
>>> s = '[i1]scale=-2:givenHeight_1[o1];'
How can I remove givenHeight_1
and turn the string to this?
>>> '[i1]scale=-2:360[o1];'
Is there an efficient one-liner regex for such a job?
UPDATE 1: my regex so far is something like this but currently not working:
re.sub('givenHeight_1[o1]', '360[o1]', s)