I'm practicing on python regex substitution with macros in property sheet. In a brute-force way, I'm doing something like:
config_regex = re.compile(r'$(Configuration)')
test_str = r'<Import Project="$(SolutionDir)\PropertySheets\Optimization.$(Configuration).props" />'
print config_regex.sub(r'Release', test_str)
However, the macro in my test string doesn't seem to be substituted. It still prints:
<Import Project="$(SolutionDir)\PropertySheets\Optimization.$(Configuration).props" />
Please help me out a little. Thanks.