I'm trying to substitute using re:
buffer = 'my_path: any_suffix'
share_path = '\\\\server\\final'
buffer = re.sub('my_path:.*', fr'my_path: {share_path}', buffer)
In the buffer I get:
'my_path: \\server\x0cinal'
instead of resired:
'my_path: \\server\final'
If I use
share_path = '\\\\server\\Final' (with capital 'F') - it works OK.
What can be done?