title: Meaning of re.compile(r"[\w']+") in Python
body: <p>I am new to python and trying to work on big data code but not able to understand what the expression <strong>re.compile(r"[\w']+")</strong> means.Anyone has any idea regarding this?</p>
  
  <p>This is the code that i m using.</p>
  
  <pre><code>from mrjob.job import MRJob
  import re
  
  WORD_REGEXP = re.compile(r"[\w']+")
  
  class MRWordFrequencyCount(MRJob):
  
      def mapper(self, _, line):
          words = WORD_REGEXP.findall(line)
          for word in words:
              yield word.lower(), 1
  
      def reducer(self, key, values):
          yield key, sum(values)
  
  
  if __name__ == '__main__':
      MRWordFrequencyCount.run()
  </code></pre>