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

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -