That works. Thanks. -----Original Message----- From: CMSTSO Pipelines Discussion List [mailto:[email protected]] On Behalf Of Rob van der Heij Sent: Tuesday, March 03, 2015 12:29 PM To: [email protected] Subject: Re: getting the last word
Spec w -1 On Mar 3, 2015 6:28 PM, "Gentry, Steve" < [email protected]> wrote: > I have a variable with words in it and I want to get the last word in > the string. > I came up with the following solution although I don't think it is > very elegant (because of the multiple stages). > 'PIPE stem dirstem.' , > '| find BUILD' , > '| split' , > '| take last' , > '| var LastWord' > > I was wondering if there was a stage or maybe something in SPEC that > would allow me to do this on one line rather than the two (split and > take last) that I'm using now. > > Thanks, > Steve >
