title: Perl regular expressions in the stringr package
body: <p>The <code>perl()</code> function is deprecated in the latest version of stringr in favor of <code>regex()</code>. However, I don't seem to be able to replicate the earlier behavior.</p>
  
  <p>To capitalize the first letter of a vector of strings, this used to work:</p>
  
  <pre><code>name &lt;- c("jim", "john", "bill")
  str_replace(name, perl("^(.)"), "\\U\\1")
  </code></pre>
  
  <p>However, this no longer works:</p>
  
  <pre><code>str_replace(name, regex("^(.)"), "\\U\\1")
  </code></pre>
  
  <p>But using base R works:</p>
  
  <pre><code>gsub("^(.)", "\\U\\1", name, perl=TRUE)
  </code></pre>
  
  <p>Is there still a way to do this with the stringr package?</p>