title: RegEx search and replace in Eclipse over multiple lines with start and middle and end
body: <p>I am struggling to come up with a good regex search and replace for the following case.
  I am doing a migration from RichFaces 3 to RichFaces 4 and so far I was able to do a lot of changes with regex.</p>
  
  <p>I've got something like this:</p>
  
  <pre><code>     &lt;a:ajax execute="@this"
      rendered="whatever" action="#{bean.method} 
  someotherstuff="whatever"
      /&gt;
  </code></pre>
  
  <p>What I want to do is to replace the action= with listener= in the above but without changing anything else and I only want to do it within the a:ajax tag. The order and occurrence of the attributes can vary.</p>
  
  <p>So I basically need a search and replace like this:</p>
  
  <pre><code>&lt;a:ajax(SEARCH1)action="(.+?)"(SEARCH2)/&gt;
  </code></pre>
  
  <p>replace with </p>
  
  <pre><code>&lt;a:ajax$1listener="$2"$3/&gt;
  </code></pre>
  
  <p>Any ideas. I think I might need lookahead but I haven't worked with that yet</p>
  
  <p>Update: The accepted solution does work in Eclipse for searching however there is a known bug in Eclipse that the replace isn't working when you use look around: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109481" rel="nofollow">https://bugs.eclipse.org/bugs/show_bug.cgi?id=109481</a></p>