title: Use JavaScript Regex in R
body: <p>Trying to translate some Javascript regex solutions to extract URLs in R. IT seems like grep should be able to handle this, but I am unsure of translating from javascript to R. The documentation here is a bit fuzzy from R. Here are the regular expressions I am trying to use to extract URLs:</p>
  
  <pre><code>http URL: (https?)://(www.)?[^\s]+    
  bitly URL: [^https?:\/\/](bitly\.com|bit.ly)[^\s]+    
  www URL: \bwww.[^\s]+
  </code></pre>
  
  <p>Can anyone help in translating this to R?</p>