title: Formatting a regex for complex variable names
body: <p>I have a two-column data frame and would like to split one of the columns into two- one with a bacterial strain name, and another with the Media it was grown in.
  This data is in a column titled "strain" and is in the format "Speciesname"-"Mediatype". I would like to use a regex that detects the hyphen "-" to separate the two variables into different columns. </p>
  
  <p>Here is the code I've tried so far:</p>
  
  <pre><code>lysate.long &lt;-
  lysate %&gt;%
  filter(str_detect(Strain, pattern = "[:alnum:]-[:alnum:]")) %&gt;%
  tidyr::extract(Strain,
               c("Strain", "Media"),
               regex = "([[:alnum:]])-([[:alnum:]]+)",
               convert = TRUE)
  </code></pre>
  
  <p>However, the above code does not include periods, which are present both in the Strain and Media name. For example, the strains are named "E.coli", "B.Subtilis" Etc. and the Media is named "0", "0.1", "0.01" according to dilution.</p>
  
  <p>The current regex I'm using only detects characters before or after the period. How can I format it so that both characters are included?</p>