c# - Replacing a String with Regular expression -


suppose have text "hello @c1, please go here , play @c12, @c1 goes , plays", write pattern replace of @c1 value in same time regular expression must not change @c12 or @c123 etc.. should replace matched string. have been trying hours, failing produce right output, can can me regarding articles or code samples

i using .net framework writing regular expression

you can use regex:

@c1\b 

working demo

enter image description here

the idea use word boundary after text , solve problem


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -