The whole file consists of lines like below.
\"ansText\" : \"11\",
\"boundsX\" : 0,
\"string\" : \"11\"
For any lines starting with title, I would like to remove the character ; from the string after it. Below is an example of expected output
Input:
\"title\" : \"244442424268391(:)7)$(.:$?3.&!&3$83;767:2\",
Output:
\"title\" : \"244442424268391(:)7)$(.:$?3.&!&3$83767:2\",
I know how to set the regular expression to find the expression title by using:
str0 = re.sub(r'\"title.*',"\"title\" : ",str0)
But I am not too certain how can I keep the original string but remove only one character.