title: Selective replace string in R
body: <p>I have a vector of strings.  Most of the elements in the vector consist of one or more letters followed by one or more numbers. I wish to selectively replace only the words with "September" (and its abbreviations) in each string with "Sep" but retain the numbers.
  This is what I have tried out using stringr package</p>
  
  <pre class="lang-r prettyprint-override"><code>my.data &lt;- c("01Sept2019", "05sep2019", "4September2019", "8sep2019",
                "12oct2019", "4Jun2018", "17Mar2017", "09May2015", "13Sep19")
  
  library(stringr)    
  my.data %&gt;% str_replace_all("(?i)Sept?(ember)?[0-9]", "Sep") 
  #&gt;  [[1]]
  #&gt;    [1] "01Sep019", "05Sep019", "4Sep019", "8Sep019", "13Sep9"
  </code></pre>
  
  <p>This is what I would like to obtain:</p>
  
  <pre><code>#&gt; [1] "01Sep2019", "05Sep2019", "4Sep2019", "8Sep2019", "13Sep19"
  </code></pre>
  
  <p>Can someone please help me out. Thanks</p>