title: VB.Net Beginner: Replace with Wildcards, Possibly RegEx?
body: <p>I'm converting a text file to a Tab-Delimited text file, and ran into a bit of a snag. I can get everything I need to work the way I want except for one small part.</p>
  
  <p>One field I'm working with has the home addresses of the subjects as a single entry ("1234 Happy Lane Somewhere, St 12345") and I need each broken down by Street(Tab)City(Tab)State(Tab)Zip. The one part I'm hung up on is the Tab between the State and the Zip.</p>
  
  <p>I've been using input=input.Replace throughout, and it's worked well so far, but I can't think of how to untangle this one. The wildcards I'm used to don't seem to be working, I can't replace ("?? #####") with ("??" + ControlChars.Tab + "#####")...which I honestly didn't expect to work, but it's the only idea on the matter I had.</p>
  
  <p>I've read a bit about using Regex, but have no experience with it, and it seems a bit...overwhelming.</p>
  
  <p>Is Regex my best option for this? If not, are there any other suggestions on solutions I may have missed?</p>
  
  <p>Thanks for your time. :)</p>
  
  <p>EDIT: Here's what I'm using so far. It makes some edits to the line in question, taking care of spaces, commas, and other text I don't need, but I've got nothing for the State/Zip situation; I've a bad habit of wiping something if it doesn't work, but I'll append the last thing I used to the very end, if that'll help.</p>
  
  <pre><code>If input Like "Guar*###/###-####" Then
  input = input.Replace("Guar:", "")
  input = input.Replace("  ", ControlChars.Tab)
  input = input.Replace(",", ControlChars.Tab)
  input = "C" + ControlChars.Tab + strAccount + ControlChars.Tab + input
  End If
  
  input = System.Text.RegularExpressions.Regex.Replace(" #####", ControlChars.Tab + "#####") &lt;-- Just one example of something that doesn't work.
  </code></pre>
  
  <p>This is what's written to input in this example</p>
  
  <pre><code>"         Guar: LASTNAME,FIRSTNAME  999 E 99TH ST  CITY,ST 99999  Tel: 999/999-9999"
  </code></pre>
  
  <p>And this is what I can get as a result so far</p>
  
  <pre><code>C   99999/9  LASTNAME   FIRSTNAME   999 E 99TH ST   CITY    ST 99999    999/999-9999
  </code></pre>
  
  <p>With everything being exactly what I need besides the "ST 99999" bit (with actual data obviously omitted for privacy and professional whatnots).</p>
  
  <p>UPDATE: Just when I thought it was all squared away, I've got another snag. The raw data gives me this.</p>
  
  <pre><code>#   TERMINOLOGY #########   ##/##/####  #   ###.##
  </code></pre>
  
  <p>And the end result is giving me this, because this is a chunk of data that was just fine as-is...before I removed the Tabs. Now I need a way to replace them after they've been removed, or to omit this small group of code from a document-wide Tab genocide I initiate the code with.</p>
  
  <pre><code>#TERMINOLOGY###########/##/########.##
  </code></pre>
  
  <p>Would a variant on rgx.Replace work best here? Or can I copy the code to a variable, remove Tabs from the document, then insert the variable without losing the tabs?</p>