'How replace specified group content by re?

I have a string like this:
'[keep]:{[br]<stat>:"{status:[error]}",[br]<tool>:"{tools:[C245]}",[br]<temp>:"489",[br]<setT>:"45"}'


And want replace 45 to 100.The final string will be:
'[keep]:{[br]<stat>:"{status:[error]}",[br]<tool>:"{tools:[C245]}",[br]<temp>:"489",[br]<setT>:"100"}'


I use re.sub(r"setT.+?(\d+)", r"100", s), but it work incorrectly.Can someone know how to do?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source