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

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -