title: Visual Studio 2010 Find and Replace Regular Expression Help (for php short tags)
body: <p>I have some php scripts that I need to short tags with their full blown alternative, I'm using vs.php for visual studio 2010 and what to do a Find And Replace using regular expressions. so far I have the following:</p>
  
  <pre><code>Find RegEx: \&lt;\?=\({(.+)}\)\?\&gt;
  Replace RegEx: \&lt;\?php echo \1 \?\&gt;
  </code></pre>
  
  <p>This works fine if there is only one short tag in a line but if there are two or more then it doesn't work properly, it finds the last instance of ")\?>" and I just want to find the next. eg.</p>
  
  <pre><code>Test: &lt;?=($foo)?&gt;
  Result: &lt;?php echo $foo ?&gt;
  OK
  
  Test: &lt;?=($foo)?&gt; &lt;?=($bar)?&gt;
  Result: &lt;?php echo $foo)?&gt; &lt;?=($bar ?&gt;
  Not OK
  </code></pre>