title: Regular expression to separate string containing upper and lower case
body: <p>I can't get an regular expression task working, it would be great if someone could help.
  I need to separate gene names from descriptions that are attached to them. Using a term that appeared in 99% of cases involved separating it from "GeneCards Summary", solvable using tidyverse via <code>gene &lt;- str_split (DF$Gene, "GeneCards Summary", simplify = TRUE)</code>. But now there are some that do not follow this pattern, exemplified here:</p>
  
  <pre><code>example &lt;- c("STAT1Predisposition to Mucocutaneous Candidiasis", 
               "PMS2DNA Repair DefectsPMS2 Deficiency", 
               "FANCACombined ImmunodeficiencyFANCA", 
               "HAX1 This gene", "ELANE ELANE is a gene", 
               "IL1RNNon-Inflammasome Related", "PRKDCT-B- SCIDDNA PKcs",
               "MSH6Severe Reduction", "AP3B1FHL Syndromes")
  </code></pre>
  
  <p>I was able to make out the following patterns, hopefully this covers all of them (unlikely but with your solution I should get the rest as well if they pop up): </p>
  
  <p>1) Genename followed by a word containing UPPERCASElowerlase (So separate this part from the part before).<br>
  2) GenenameDNA (Seperate "DNA" from part before.<br>
  3) genename"" (empty space)<br>
  4) genenameT-B-.<br>
  5) genenameFHL.    </p>
  
  <p>Actually the trickiest is the UPPERCASe lowercase part, the others I will try to solve and post here.<br>
  Thanks a lot for your help!
  Sebastian </p>
  
  <p>Here is part of my solution without the upper/lower one:</p>
  
  <pre><code>clean_1 &lt;- str_split(example, "DNA", simplify = T)
  clean_2 &lt;- str_split(clean_1, "[[:blank:]]", simplify = T)
  clean_3 &lt;- str_split(clean_2, "T-B", simplify = T)
  clean_4 &lt;- str_split(clean_3, "FHL", simplify = T)
  </code></pre>
  
  <p>I would do this each round to get the data cleaned up but there is probably a better way to do this.</p>