title: Is there a function in PySpark similar to the re.findall() function of python?
body: <p>For an assignment I need to extract all "mentions" in a comment. In plain python I would do something like this:</p>
  
  <pre><code>string = "@rjberger10 @geneh19 home"
  re.findall(r'@\w+', string)
  </code></pre>
  
  <p>This would give me an array like this: ['@rjberger10', '@geneh19']. However the assignment states that we have to use the PySpark way, but I can't find a function in PySpark similar to findall(). The closest I got was this:</p>
  
  <pre><code>result = dict_comments[13].withColumn("@tjes", regexp_extract(col("Text"), r'(@\w+)', 0))
  </code></pre>
  
  <p>However this only gives me the first time an @ is used, so when there are multiple mentions I only find one.</p>