This is a migrated thread and some comments may be shown as answers.

Not getting proper content value using regex

0 Answers 24 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hallatie
Top achievements
Rank 1
hallatie asked on 02 Mar 2011, 04:39 AM
Wanted the space between the span tags to be replaced by  
<span style="font-size:11;color:black"> </span>
For that i wrote teh following regex but it give me the out put as below :
regex :
Regex.Replace(xml, @"<span[^>]*?>\s*</span>", (match) => match.Value.Replace(" ", "&nbsp;"), RegexOptions.IgnoreCase);
output :
<span&nbsp;style="font-size:11;color:black">&nbsp;</span>

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
hallatie
Top achievements
Rank 1
Share this question
or