> On 1 Oct 2002 at 18:47, [EMAIL PROTECTED] wrote:
>
> > > > all text up to, but not including the string "union".

How about (Perl6)

  /(.*?) union {$pos -= length('union');}/

   This gets everything up to and including the first instance of 'union',
then gets rid of the bit at the end that we don't want.  The capturing
parentheses ensure that we return the part of the string we want, and we
manually reset $pos to the correct position.  This is easy to understand,
and very extensible.

Joe Gottman


Reply via email to