extern const BP_UINT8 g_SysMapDis_<DIST_N>[];
I want to replace the 'DIST_N' with '0' or '1', like:
extern const BP_UINT8 g_SysMapDis_0[];
So I do something like this
Regex REGEX_CODE_BLOCK_DIST_N = new Regex(@"(.+)(<DIST_N>)(.+)");
int n = 0;
string codeBlock = "extern const BP_UINT8 g_SysMapDis_<DIST_N>[];";
string ret += REGEX_CODE_BLOCK_DIST_N.Replace(codeBlock, "$1" + n + "$3");
I only get this
$10[];// should be "extern const BP_UINT8 g_SysMapDis_0[];"
So how to append a number after "$1"?