title: How to use regex to include/exclude some input files in sc.textFile?
body: <p>I have attempted to filter out dates for specific files using Apache spark inside the file to RDD function <code>sc.textFile()</code>.</p>
  
  <p>I have attempted to do the following:</p>
  
  <pre><code>sc.textFile("/user/Orders/201507(2[7-9]{1}|3[0-1]{1})*")
  </code></pre>
  
  <p>This should match the following:</p>
  
  <pre><code>/user/Orders/201507270010033.gz
  /user/Orders/201507300060052.gz
  </code></pre>
  
  <p>Any idea how to achieve this?</p>