You're right, that's exactly what I wanted, cheers. I always thought the
shortest match for that would be "fish" if you didn't specify a ^

Lousy regexes :)

Thanks!

-Josh

On Tue, Jun 3, 2008 at 5:52 PM, nkopcsek <[EMAIL PROTECTED]> wrote:

>   I'm sure this will help you:
> http://exampledepot.com/egs/java.util.regex/Greedy.html
>
> If you want the shortest possible match you have to make the
> quantifier non-greedy by adding an ?, like:
>
> /.*?fish/g/
>
>  
>



-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to