LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 19 Apr 2005 14:17:00 +0200
Reply-To:     Georg.Maubach@dpwnbc.net
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Georg Maubach <Georg.Maubach@dpwnbc.net>
Subject:      Substring with INDEX and RINDEX
Content-Type: text/plain; charset="us-ascii"

Hi All,

I would like to extract the middle part of a string.

Example: String: pred_DET_emp Middle part of the string: DET.

The COMPUTE command COMPUTE part = SUBSTR(case_lbl,INDEX(case_lbl,"_")+1,RINDEX(case_lbl,"_")-1) results in "DET_emp" instead of "DET".

Can anybody help?

Best regards

Georg Maubach Market Analyst Deutsche Post World Net


Back to: Top of message | Previous page | Main SPSSX-L page