How to replace the string based on an expression

Posted by deepak on Stack Overflow See other posts from Stack Overflow or by deepak
Published on 2013-11-06T09:43:24Z Indexed on 2013/11/06 9:53 UTC
Read the original article Hit count: 160

Filed under:
|

I'm having a string where i'm using some placeholders to replace it with some values based on an object.

It is like the following:

Hello User <#= UserName #>

I need to replace the <#= UserName #> with a value.

How can this be done with a regex? Please help. I dont want a string replace solution. There are somany placeholders and hardcoding the <#= UserName #> and replace with the value is pointless

© Stack Overflow or respective owner

Related posts about c#

Related posts about regex