On Wed, Aug 10, 2011 at 18:35, Graeme Geldenhuys <[email protected]>wrote:

> On 08/10/2011 05:18 PM, Graeme Geldenhuys wrote:
> >
> > The following regex matches the first { symbol up until the last }
> > symbol. :-(  I obviously want it to stop at the first } it encounters.
> >
> > This is the regex I'm currently using:
> >
> >     \s*\{\$.*\}
>
>
> Ah, I found it. TRegExpr supports the non-greedy syntax, so I changed
> the above regex to read:
>
>  \{\$.*?\}
>
>
> *? makes it non-greedy. :-)
>

Only on Perl like syntax, not on POSIX regex.


>
>
>
> Regards,
>  - Graeme -
>
> --
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> http://fpgui.sourceforge.net/
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to