title: Using Character Groups properly in a C# regular expression
body: <p>There is a better way to simplify this Regex to a more terse format, but I can't seem to implement character groups properly for reuse.  Any other recommendations for how to better go about accomplishing this match would be apprecitated.</p>
  
  <p>Intended match: </p>
  
  <pre><code>&lt;Formatting Type="B"&gt;any text&lt;/Formatting&gt;
  </code></pre>
  
  <p>This could be nested within other Formatting tags like so </p>
  
  <pre><code>&lt;Formatting Type="B"&gt;&lt;Formatting Type="I"&gt;any text&lt;/Formatting&gt;any text&lt;/Formatting&gt;
  </code></pre>
  
  <p>The following Regex does the trick, but seems more complicated than it should be, as I am repeating myself with this section three times </p>
  
  <p>The end goal is to replace all instances of <code>&lt;Formatting</code> with standard HTML tags <code>&lt;B&gt; &lt;I&gt; &lt;U&gt;</code> etc.</p>
  
  <pre><code>[\040\w!\?\:\.]*
  </code></pre>
  
  <p>Overall Regex is the following</p>
  
  <pre><code>&lt;Formatting Type="[BIU]{1}"&gt;([\040\w!\?\:\.]*(&lt;[BIU]&gt;)*[\040\w!\?\:\.]*(&lt;/[BIU]&gt;)*[\040\w!\?\:\.]*)*&lt;/Formatting&gt;
  </code></pre>