Hi All,
Can any one let me know "How to replace the exact word in a string" in c#?
For Example: I have a statement like this "............... <span lang=EN style='...... ..> .......................<span lang=EN> ........... <span lang=EN-US>......"
I would like to replace the lang=EN, and lang=EN-US parts . How would I do so?
I am using regex method with @"\blang=EN\b" pattern and replacing with lang="EN" , but the problem is it will replace even lang=EN-US which I don't want it.
The result is coming like "............... <span lang="EN" style='...... ..> .......................<span lang="EN"> ........... <span lang="EN"-US>......"
I don't want EN-US to be split.I am replacing EN-US with another string lang="EN-US"
I want the result to be like "............... <span lang="EN" style=' ...
Go to the complete details ...