c# - Find pattern and replace to another pattern string -
i tried check if string contains patterns string example: '4+3+6**4'.
i want replace pattern **
pow(x,y)
.
so want string 4+3+pow(6,4)
.
i want know if there way 'regex'.
trt.
just capture number exists before , after **
along match **
, replace match pwo($1,$2)
.
regex.replace(string, @"(\d+)\*\*(\d+)", "pwo($1,$2)");
Comments
Post a Comment