<span class="Apple-style-span" style="font-family: Arial, Verdana, Helvetica; font-size: 12px; "><p>Hi all,</p><p><span class="Apple-tab-span" style="white-space: pre; ">        </span>I want a  regex used in Perl which is</p><p>
<span class="Apple-tab-span" style="white-space: pre; ">      </span>@ret = $query =~ /(googl.?)|(.?oogle)/;</p><p><span class="Apple-tab-span" style="white-space: pre; ">       </span>if the $query is "google",  then will be matched, and the @ret = (google, undef), $1 = "google", $2 is undef</p>
<p><span class="Apple-tab-span" style="white-space: pre; ">     </span>but I want result like @ret = (google, google), because the pattern  "(.?oogle)" is matched too,</p><p><span class="Apple-tab-span" style="white-space: pre; ">    </span>And my regex is very long (the regex above is just an example), maybe thouands of "|", so if separate<span class="def"> </span>the regex  to /(googl.?)/ and /(.?oogle)/ will be inefficient. </p>
<p> </p><p><span class="Apple-tab-span" style="white-space: pre; "></span><span class="Apple-tab-span" style="white-space: pre; ">  </span>Does anybody can help me?  Thanks! </p></span>