title: how to take certain phrases from a regex and place them into different groups in c#
body: <p>Below is a string that I have been working with for awhile (example is based on Apple's example for coding and emails):</p>
  
  <pre><code>2.3|[jappleseed@example.com][pwd_removed][johnnyappleseed@example.com][Johnny][Appleseed][APPLES]
  </code></pre>
  
  <p>This comes from a database I use that holds accounts. Every person who is registering has to have these, so every line is formatted the same. They will be different information, but still formatted the same. In order to register for an account, you need a username, password(which is invisible to me), an email address and a 6 character code. </p>
  
  <p>What I am trying to do is take the username, email address, First name, Last name, and the 6 character code into different groups. Below is a regex statement I have been working on:</p>
  
  <pre><code>^.*\[(.*)\]$
  </code></pre>
  
  <p>The problem with this statement is that it matches everything in the statement, and I want it matched in groups. I understand this is where I need to use Split method, but I have no idea as to how I can use the Split method to place what I want in groups. So my question is: do I have to make multiple lines of code for one group, or is there a method that can make my life a lot easier? Any help would be appreciated!</p>