title: Find pattern in String C#
body: <p>Hi I have following string pattern:</p>
  
  <p><code>*A</code></p>
  
  <p><code>*BA*</code></p>
  
  <p><code>AB</code></p>
  
  <p><code>*GN*BN</code></p>
  
  <p>I need to find such pattern in my input string.
  If it matches, I need to replace the values accordingly.</p>
  
  <p>How can I do it with regex?
  Here pattern that I shown above is coming from XML file. So it is dynamic.
  <code>*</code> here means wild card character. so,</p>
  
  <p><code>*A</code> means string ending with <code>A</code>. </p>
  
  <p><code>*BA*</code> means string containg <code>BA</code> in between. </p>
  
  <p><code>AB</code> means exact <code>AB</code> string. </p>