title: In R, how do I match markdown list
body: <p>I'm trying to match the following ordered and unordered lists and extract the bullet/list point. </p>
  
  <pre><code>library(stringr)
  examples &lt;- c(
  "* Bullet 1\n* Bullet 2\n* Bullet 3",
  "1. Bullet 1\n2. Bullet 2\n3. Bullet 3",
  "* This is a test 1\n* This is a test with some *formatting*\n* This is a test with different _formatting_"
  )
  </code></pre>
  
  <p>What I would like to do is: </p>
  
  <ol>
  <li>Recognize that it's a list programatically</li>
  <li>Parse each into just the text of the list item</li>
  </ol>
  
  <p>The result would be</p>
  
  <pre><code>some_str_fun(example,pattern) # or multiples
  "Bullet 1" "Bullet 2" "Bullet 3"
  "Bullet 1" "Bullet 2" "Bullet 3"
  "This is a test 1" "This is a test with some *formatting*" 
  "This is a test with different _formatting_"
  </code></pre>
  
  <p>I've been playing with the following patterns, and str_extract/match but can't seem to find something completely functional</p>
  
  <pre><code>[*]+\\s(.*?)[\n]* # for * Bullet X\n
  [1-9]+[.]\\s(.*?)[\n]* # for 1. Bullet X\n
  </code></pre>
  
  <p>I've tried a bunch of different iterations on these patters but can't quite seem to get what I'm looking for.</p>