use str.indexOf to detect the position of "and", using this info you can use substring() HTH! David. ----- Original Message ----- From: "Stevenson Ngila" <Stevenson at epr.footman-walker.com> To: "Thelist at Lists. Evolt. Org" <thelist at lists.evolt.org> Sent: Tuesday, July 01, 2003 11:01 AM Subject: [thelist] string > > Hi, > If i have a string "john, peter, george and steve", > how can i get the string after "peter, " > but before "and"; > such that it's very generic i.e. i don't have to use substring() to > do the count. > > > -- > * * Please support the community that supports you. * * > http://evolt.org/help_support_evolt/ > > Evolt.org conference in London, July 25-27 2003. Register today at http://evolt.org.uk > > For unsubscribe and other options, including the Tip Harvester > and archives of thelist go to: http://lists.evolt.org > Workers of the Web, evolt !