This might work. Not one line, but close. TTD 5 lines long.
----: P 0001: A = 'ACBACCACDACEACF' 0002: X = COUNT(A,'AC') 0003: Y = INDEX(A,'AC',X) 0004: CRT X, Y, A[Y,2] 0005: END Bottom at line 5. ----: EX Basic (Y/N) ?N >TTD 5 13 AC > Tom Dodds [EMAIL PROTECTED] 630-235-2975 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hari T. K. Varma Sent: Wednesday, September 28, 2005 10:35 AM To: [email protected] Subject: [U2] To locate the last occurrence of a sub-string in a string Hi Is there any direct one step method to locate the position of last occurrence of a Sub-string in an existing string. For ex:- to locate the last occurrence of "AC" in the string X="AC2BC2CD2AC2AC2BC2SS" for this case the position should be returned 5. Your valuable inputs will be appreciated Thanks, Hari Varma **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS*** ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
