title: Multiple word replacement by list - duplicates creation
body: <p>There is list of replacements ( <a href="http://pastebin.com/JH932Qxi" rel="nofollow">http://pastebin.com/JH932Qxi</a> ) 
  and list which is necessary to replace ( <a href="http://pastebin.com/RSwdWiKy" rel="nofollow">http://pastebin.com/RSwdWiKy</a> ).
  Rules for replacement:</p>
  
  <pre><code>S1000005    =   S1000005,S1000006,S1000010
  S1000007    =   S1000007,S1000008
  S1000009    =   S1000009
  S2000005    =   S2000005,S2000006,S2000007,S2000008
  S2000009    =   S2000009,S2000010
  S3000005    =   S3000005,S3000010
  S3000006    =   S3000006,S3000008
  S3000007    =   S3000007,S3000009
  </code></pre>
  
  <p>Input lines:</p>
  
  <pre><code>S1000005    S2000005    S3000005
  S1000006    S2000006    S3000006
  S1000007    S2000007    S3000007
  S1000008    S2000008    S3000008
  S1000009    S2000009    S3000009
  S1000010    S2000010    S3000010
  </code></pre>
  
  <p>Result should be like this <a href="http://pastebin.com/8BkRFC87" rel="nofollow">http://pastebin.com/8BkRFC87</a>.</p>
  
  <p>Example output:</p>
  
  <pre><code>S1000005    S2000005    S3000005
  S1000005    S2000005    S3000006
  S1000007    S2000005    S3000007
  S1000007    S2000005    S3000006
  S1000009    S2000009    S3000007
  S1000005    S2000009    S3000005
  </code></pre>
  
  <p>I have done this using notepad++ (it saved time a lot), but it is possible to make fully automated. (At first I make splitting to the lines, than using bookmarks line replacement and than making 3 columns back).</p>
  
  <p>How to read the list of replacements to create the replacement discretionary? And how to use dictionary to make lists of duplicates by replacement?</p>
  
  <p>Or is there any text editor which can do search "S1000005,S1000006,S1000010,S1000011,S1000022,S1000023,S1000024,S1000025,S1000056" and replace each by "S1000005"?</p>