Regex.Replace() for replacing the whole occurrence
Posted
by Nimmi
on Stack Overflow
See other posts from Stack Overflow
or by Nimmi
Published on 2010-05-04T10:45:38Z
Indexed on
2010/05/04
10:58 UTC
Read the original article
Hit count: 363
regex
Hi,
Am using regex.Replace() to replace the whole occurrence of a string.. so I gave like Regex.Replace(str,@stringToReplace,"**"); where stringToReplace = @"session" + "\b";
if i give like that its not replacing.. but if i give like Regex.Replace(str,@"session\b","**"); then its working.. how to avoid this.. i want to pass value which will be set dynamically..
Thanks nimmi
© Stack Overflow or respective owner