Not getting proper content value using regex

1 posts, 0 answers
  1. hallatie
    hallatie avatar
    15 posts
    Member since:
    Feb 2011

    Posted 01 Mar 2011 Link to this post

    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 :
Back to Top