title: Perl regex: How do you match multiple words in perl?
body: <p>Im writing a small script which is supposed to match all strings within another file (words in between "" and '' including the "" and '' symbols as well). </p>
  
  <p>Below is the regex statement i am currently using, however it only produces results for <code>'(.*)'</code> and not <code>"(.*)"</code></p>
  
  <pre><code>my @string_matches = ($file_string =~ /'(.*)' | "(.*)"/g);
  
  print "\n@string_matches";
  </code></pre>
  
  <p>Also how would I be able to include the "" or '' symbols in the results as well?(print out "string" instead of just string)
  I've tried searching online but couldnt find any material on this</p>
  
  <p>$file_string is basically a string version of an entire file.</p>