title: rvest - scrape 2 classes in 1 tag
body: <p>I am new to rvest. How do I extract those elements with 2 class names or only 1 class name in tag?</p>
  
  <p>This is my code and issue:</p>
  
  <pre><code>doc &lt;- paste("&lt;html&gt;",
               "&lt;body&gt;",
               "&lt;span class='a1 b1'&gt; text1 &lt;/span&gt;",
               "&lt;span class='b1'&gt; text2 &lt;/span&gt;",
               "&lt;/body&gt;",
               "&lt;/html&gt;"
              )
  library(rvest)
  read_html(doc) %&gt;% html_nodes(".b1")  %&gt;% html_text()
  #output: text1, text2
  #what i want: text2
  
  #I also want to extract only elements with 2 class names
  read_html(doc) %&gt;% html_nodes(".a1 .b1") %&gt;% html_text()
  # Output that i want: text1
  </code></pre>
  
  <p>This is my machine spec:</p>
  
  <p>Operation System: Windows 10.</p>
  
  <p>rvest version: 0.3.2</p>
  
  <pre><code>R version 3.3.3 (2017-03-06)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  Running under: Windows &gt;= 8 x64 (build 9200)
  </code></pre>
  
  <p>Anybody can help?</p>