title: C# pattern matching
body: <p>I am bit new to c#, i am looking for a string matching pattern to do the following,</p>
  
  <p>I have a string like this </p>
  
  <blockquote>
    <p>The book will be showcased at a
    reception in Number 11 Downing Street 
    and will be attended by key healthcare</p>
  </blockquote>
  
  <p>i need to create a span tag to highlight some text fragments using startIndex and length,</p>
  
  <p>for an example, </p>
  
  <blockquote>
    <ol>
    <li>startIndex = 3, Length = 10</li>
    <li>startIndex = 8, Length = 8</li>
    </ol>
  </blockquote>
  
  <p>i need to create a span tag dynamically and also create a separate span tag for intersections</p>
  
  <p>in this case,</p>
  
  <pre><code>The &lt; span id= 'span1' color='blue'&gt; book &lt; /span&gt; &lt; span id='intersectionSpan' color= pink &gt; will &lt;/ span&gt; &lt; span id '= span2' color = 'yellow' &gt; be showcased &lt;/ span&gt;
  </code></pre>
  
  <p>anyone has come across any kinds of design pattern or smiler problems</p>
  
  <p>please advice  </p>