[Lazarus] Regex help needed please

ik idokan at gmail.com
Wed Aug 10 17:37:27 CEST 2011


On Wed, Aug 10, 2011 at 18:35, Graeme Geldenhuys <graemeg.lists at gmail.com>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
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110810/95977d85/attachment-0003.html>


More information about the Lazarus mailing list