word -3;-1

On 30 April 2015 at 22:07, Gentry, Steve <
[email protected]> wrote:

> Ergo for last 3 words:  "word -3;-2;-1"
>
> -----Original Message-----
> From: CMSTSO Pipelines Discussion List [mailto:[email protected]]
> On Behalf Of Rob van der Heij
> Sent: Thursday, April 30, 2015 4:05 PM
> To: [email protected]
> Subject: Re: SPECS again
>
> And you're probably right that the classic approach would be your  "split
> | take last"  idiom, but that gets hairy when you have multiple records in
> the pipeline. So this comes handy. And when you're looking for the
> one-but-last it's "word -2" and it takes some time to realize that the last
> two words is "word -2;-1"
>
> On 30 April 2015 at 21:21, Gentry, Steve <
> [email protected]> wrote:
>
> > Thanks.
> >
> > -----Original Message-----
> > From: CMSTSO Pipelines Discussion List
> > [mailto:[email protected]]
> > On Behalf Of Rob van der Heij
> > Sent: Thursday, April 30, 2015 3:19 PM
> > To: [email protected]
> > Subject: Re: SPECS again
> >
> > Spec word -1
> > And home work for next week is the substr in spec On Apr 30, 2015 9:16
> > PM, "Gentry, Steve" < [email protected]> wrote:
> >
> > > In some recent discussions on this list we had discussed the SPEC
> stage.
> > > And, I thought, in one of the discussions a solution was presented
> > > on how to get the last word in a string of words.
> > > In the example below I'd like to get the word  fox.
> > > pipe literal the quick fox | spec lastword | cons Of course this
> > > doesn't work and I've tried a few other combinations and have done
> > > some googleing.
> > > I could do it this way:  pipe literal the quick fox | split | take
> > > last | cons But would prefer a specs method.
> > > So, could someone refresh my memory or is this feature/function
> > > wishful thinking?
> > > Thanks,
> > > Steve
> > >
> >
>

Reply via email to