title: remove tags from a xml file written to a string?
body: <p>this the what the data in the string looks like:</p>
  
  <pre><code>&lt;temp&gt;&lt;id&gt;TGPU1&lt;/id&gt;&lt;label&gt;GPU&lt;/label&gt;&lt;value&gt;67&lt;/value&gt;&lt;/temp&gt;&lt;temp&gt;&lt;id&gt;THDD1&lt;/id&gt;&lt;label&gt;ST3320620AS&lt;/label&gt;&lt;value&gt;34&lt;/value&gt;&lt;/temp&gt;&lt;temp&gt;&lt;id&gt;FCPU&lt;/id&gt;&lt;label&gt;CPU&lt;/label&gt;&lt;value&gt;1430&lt;/value&gt;&lt;/temp&gt;
  </code></pre>
  
  <p>(there is more, that is just a small snipping of the original output.)
  what i would like to do is feed it through some fast code(not in terms of how long the actual code is, but how long it takes to execute) that will remove all the </p>
  
  <pre><code>&lt;temp&gt;&lt;id&gt;TGPU1&lt;/id&gt;&lt;label&gt;GPU&lt;/label&gt;&lt;value&gt;
  </code></pre>
  
  <p>and output it to a new string with only the value between all the <code>&lt;value&gt;</code>'s and <code>&lt;/value&gt;</code>'s. im looking for output in the string like: 67341430.<br>
  i found this code: </p>
  
  <pre><code>bool FoundMatch = false;
  
  try {
      Regex regex = new Regex(@"&lt;([be])pt[^&gt;]+&gt;.+?&lt;/\1pt&gt;");
      while(regex.IsMatch(yourstring) ) {
              yourstring = regex.Replace(yourstring, "");
      }
  } catch (ArgumentException ex) {
      // Syntax error in the regular expression
  }
  </code></pre>
  
  <p>but it only removes the &lt;*pt> which cold be changed to remove something else. but it would only remove one tag at a time. not very fast if i have to remove all tags.</p>
  
  <p>thanks</p>
  
  <p>PS if you wanted to know, the code below is the code i am looking to add this to. this is also the code that printed the original string mentioned above:</p>
  
  <pre><code>static void Main(string[] args)
  {
      Console.WriteLine("Memory mapped file reader started");
  
      using (var file = MemoryMappedFile.OpenExisting("sensor"))
      {
          using (var reader = file.CreateViewAccessor(0, 3800))
          {
              var encoding = Encoding.ASCII;
              Console.WriteLine(encoding.GetString(bytes));
          }
      }
  
      Console.WriteLine("Press any key to exit ...");
      Console.ReadLine();
  }
  </code></pre>