Seems like you could use the STREXTRACT( ) Function
----- Original Message ----- From: "Allen" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, May 07, 2008 2:51 PM Subject: RE: VFP9 SP2: substring extraction Something like (bear in mind the wine has flowed :) Local retval, lText Retval = "" lText = strtran(lcIn,"[","["+chr(13+chr(10) lText = strtran(lText,"]","]"+chr(13+chr(10) For iicount = 1 to memlines(lText) if left(mline(lText,iicount) <> "[" retval = retval + mline(lText,iicount) endif Next iicount Return retval Allen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Bourke Sent: 07 May 2008 17:57 To: [EMAIL PROTECTED] Subject: Re: VFP9 SP2: substring extraction Well, shortest I can manage is: lcIn = "Apples [some text]; oranges [some more text]; bananas [more text]" lcOut = "" lnLines = ALines(laFruits, lcIn, 9, ";") For lnLoop = 1 To lnLines lcOut = lcOut + Left(laFruits[lnLoop], Atc(" ", laFruits[lnLoop])-1) + ";" Endfor ? lcOut But I bet some Regular Expression maven can better it! -- Alan Bourke [EMAIL PROTECTED] [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

