grep lines that contains only numbers or only letters characters until a delimiter
<p>Kind of a confusing title, but let me explain.
I have a tab delimited file that contains lines in the following format (columns are delimited by tab)</p>

<pre><code>Extra   573102|000473
Extra   ZRY|BC95624
Missing ABC|BC99000
Missing 123456|001122
</code></pre>

<p>I'd like to split the file to 4 different files, based on the following logic:</p>

<ol>
<li><p>If line contains "Extra" and only numbers until the "|", put that line in file #1 (In the above case, file #1 will contain "Extra   573102|000473").</p></li>
<li><p>If line contains "Extra" and only letters until the "|", put that line in file #2 (In the above case, file #2 will contain "Extra   ZRY|BC95624").</p></li>
<li><p>If line contains "Missing" and only numbers until the "|", put that line in file #3 (In the above case, file #3 will contain "Missing   ABC|BC99000").</p></li>
<li><p>If line contains "Missing" and only letters until the "|", put that line in file #4 (In the above case, file #4 will contain "Missing   123456|001122").</p></li>
</ol>

<p>I have no idea how to combine the text, tab character and the regex that will accomplish the above.</p>