split tVar by CR combine tVar by CR If you don’t need to keep them in order. Alex
Sent from my iPad > On 13 Mar 2022, at 04:14, Terry Judd via use-livecode > <[email protected]> wrote: > > There are sure to be more elegant ways but you could just rebuild the list > skipping the duplicates as you go > > # tList1 contains original list > put cr into tList2 > repeat for each line x in tList1 > if tList2 contains cr&x&cr then # ensures you check whole not partial lines > # do nothing > else > put x&cr after tList2 > end if > end repeat > put char 2 to -2 of tList2 into tList2 # delete the leading and trailing > returns > > If you need to retain line specific formatting in the field though you’ll > need a different approach. > > Terry… > > Terry Judd | Senior Lecturer in Medical Education > Department of Medical > Education<https://medicine.unimelb.edu.au/school-structure/medical-education> > The University of Melbourne<https://www.unimelb.edu.au/> > M: 61-435 961 594 > E: [email protected]<mailto:[email protected]> > Publications<https://scholar.google.com/citations?user=XC5s6wwAAAAJ&hl=en> > > > From: use-livecode <[email protected]> on behalf of Roger > Guay via use-livecode <[email protected]> > Date: Sunday, 13 March 2022 at 1:55 pm > To: [email protected] <[email protected]> > Cc: Roger Guay <[email protected]> > Subject: Speaking of Filter and Match... > I have a field with about a thousand lines with many duplicate lines, and I > want to delete the duplicates. Seems like this should be simple but I am > running around in circles. Can anyone help me with this? > > Thanks, > Roger > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
