16 lines
388 B
Python
16 lines
388 B
Python
#!/usr/bin/env python3
|
|
import re
|
|
|
|
path = '/Users/xujiaqian/GolandProjects/HDWL/data-engine/common/report/config/loader.go'
|
|
with open(path) as f:
|
|
content = f.read()
|
|
|
|
# Fix `\$1` → `$1` (the \ came from Python escaping in previous script)
|
|
content = content.replace('\\$1', '$1')
|
|
content = content.replace('\\$2', '$2')
|
|
|
|
with open(path, 'w') as f:
|
|
f.write(content)
|
|
|
|
print('Fixed')
|