title: Grab a part of text when it matches, get rid of the rest because it's useless
body: <p>I have a text called</p>
  
  <pre><code>string path = "Default/abc/cde/css/";
  </code></pre>
  
  <p>I want  to compare a text.<br></p>
  
  <pre><code>string compare = "abc";
  </code></pre>
  
  <p>I want a result</p>
  
  <pre><code>string result = "Default/abc";
  </code></pre>
  
  <p>The rest of the path <code>/cde/css</code> is useless.Is it possible to grab the desire result in asp.net c#. Thanks.</p>