Regex string into two dimensional array
<p><strong>UPDATE</strong></p>

<p>As my question seemed abit unclear I will clarify it.</p>

<p>regext to break out</p>

<p>createNewEmail(mailToJohn, recipientGeorge, Subject, content);</p>

<p>i want to be able so that</p>

<p>string1 = createNewMail</p>

<p>string2 = mailToJohn</p>

<p>string3 = recipientGeorge</p>

<p>string4 = Subject</p>

<p>string5 = content</p>

<p>Im creating an application which in turn will react to text written in a textbox. </p>

<p>I have this text in my textbox now</p>

<p><em><strong>createNewEmail</em></strong></p>

<p>after that I store the textbox lines in a string[] called scripts</p>

<pre><code>string[] scripts = txt_script.Lines;
</code></pre>

<p>and then i loop over it and use a switch to tell the program what  method to run.</p>

<p>But I want to extend everything with sending parameters with the method. I want to be able to write like this</p>

<p><em><strong>createNewEmail(mailToJohn, recipientGeorge, Subject, content);</em></strong></p>

<p>The parameters would differ from time to time and i want to save them in a 
string[][] </p>

<p>Because the text in the textbox will probably look like this</p>

<p><em><strong>createNewEmail(mailToJohn, recipientGeorge, Subject, content);</em></strong></p>

<p><em><strong>makeTemplateUser(templateName, userName);</em></strong></p>

<p><em><strong>deleteEmail(emailToDelete);</em></strong></p>

<p><em><strong>uppdateUserSetting(userId, changedSettings, oldSettingsId);</em></strong></p>

<p>say we parse the first line </p>

<p><em><strong>createNewEmail(mailToJohn, recipientGeorge, Subject, content);</em></strong></p>

<p>i want to be able so that </p>

<p>scriptAndParameters[0][0] = createNewMail</p>

<p>scriptAndParameters[0][1] = mailToJohn</p>

<p>scriptAndParameters[0][2] = recipientGeorge</p>

<p>scriptAndParameters[0][3] = Subject</p>

<p>scriptAndParameters[0][4] = content</p>

<p>How should i do that?</p>

<p>I tried but it keeps on nagging i can convert the string[] to a string[][] i understand that. But I can't do the following right?</p>

<p>string[][] scripts = txt_script.Lines;
Then I would put the whole string in in the wrong array? and then i have to pick it out split it and put i back inside again? or maybe that s the only way of doing it?</p>

<p>There fore is there any regex that could help me solve this problem ?</p>

<p>Or is it better to maybe do a
scriptAndParameters[,,,,] but then again i wont always know the amount of parameters?</p>
