title: Extracting two substrings with specific starting characters from a long string and concatenating them
body: <p>I am attempting to extract two pieces of information from a long string containing much more than I need. I have a tab-delimited .txt file with the following format repeated for 115,000 lines:</p>
  
  <pre><code>TRINITY_DN89_c0_g1_i1   blastx  match_part  2   388 5.00e-73    +   1   Target=UniRef90_UPI0005D06956 2 388;hin=2;hsn=1;db=uniref;hs=1;hf=0;hsl=387;hil=618;ql=390;pi=88.37;qc=99.23;hc=20.87;d=PREDICTED  uncharacterized family 31 glucosidase KIAA1161-like;tax=Plutella xylostellaTRINITY_DN89_c0_g1_i1 blastx  match_part  2   388 1.00e-72    +   1   Target=UniRef90_A0A0N1IHR0 2 388;hin=3;hsn=1;db=uniref;hs=1;hf=0;hsl=387;hil=647;ql=390;pi=82.95;qc=99.23;hc=19.94;d=Uncharacterized family 31 glucosidase KIAA1161;tax=Papilio;go=GO:0004553,GO:0005975
  </code></pre>
  
  <p>What I would like to end up with is the beginning value, in this case "TRINITY_DN89_c0_g1_i1" appended to each of the values after "go=GO:" at the end of each line.</p>
  
  <p>The output I am hoping for in this case is as follows:</p>
  
  <pre><code>TRINITY_DN89_c0_g1_i1=0004553       
  TRINITY_DN89_c0_g1_i1=0005975
  </code></pre>
  
  <p>However, the characters after <code>TRINITY_</code> and <code>go=GO:</code> are different for each line and represent unique identifiers for transcripts in a transcriptome I've assembled along with the associated gene ontology term annotations.</p>
  
  <p>Using awk or sed seems like a possibility for accomplishing this but I am unsure of how to extract these specific pieces, especially since some characters differ between lines.</p>
  
  <p>Any help is very much appreciated!</p>
  
  <p>As an update, I've gotten my data into the following format, which is definitely closer than before, thanks to help from @shellter:</p>
  
  <pre><code>TRINITY_DN30_c0_g1_i1=0004553,GO:0005975
  TRINITY_DN89_c0_g1_i1=0004553,GO:0005975
  TRINITY_DN89_c0_g2_i1=0004553,GO:0005975
  TRINITY_DN63_c0_g1_i1=0004190
  TRINITY_DN105_c0_g1_i1=0003964
  TRINITY_DN123_c0_g1_i1=0016021,GO:0005524,GO:0005215
  TRINITY_DN163_c1_g1_i1=0016021,GO:0005524,GO:0005215
  TRINITY_DN163_c1_g1_i1=0016021
  TRINITY_DN292_c0_g1_i1=0003677,GO:0006338,GO:0006357
  TRINITY_DN223_c0_g1_i1=0005858,GO:0016887,GO:0003777,GO:0003341                                
  TRINITY_DN223_c0_g1_i1=0005509,GO:0051014,GO:0045010,GO:0051016
  TRINITY_DN284_c0_g1_i1=0007010
  </code></pre>
  
  <p>Now, my issue is that I would like to have 1 line per GO value, each starting with its associated transcript ID. For instance, I would like to change the first line above to:</p>
  
  <pre><code>TRINITY_DN30_c0_g1_i1=0004553
  TRINITY_DN30_c0_g1_i1=0005975
  </code></pre>
  
  <p>and do the same for every line with multiple GO values. To be clear, lines may have one or more GO values and some lines have quite a few. Is this possible?</p>
  
  <p>Thanks!</p>