title: Creating a regex expression moving strings around
body: <p>I need to find and replace a ton of code that was written and my text editor works with regex expressions but I dont know how to make them. How would I create a regex expression to do this:</p>
  
  <p>from:</p>
  
  <pre><code>if ($q-&gt;param('wordOne[]') =~ m/wordTwo/)
  </code></pre>
  
  <p>to :</p>
  
  <pre><code>if (grep /wordTwo/, $q-&gt;param('wordOne[]')) { ... }
  </code></pre>
  
  <p>wordOne/Two can be any word that is where my problem is and im not sure how to format my regex for a find and then replace to my format</p>