clear lc_sele = "HP%DRUCKER AND (PRICE>100,00) AND (PRICE<200,00)" * why this whole work is it a mystery ? lcTest=Strtran(lc_sele,' AND ',chr(249)) && or some other CHR() value which is never used! ?GETWORDCOUNT(lcTest,chr(249)) * ALINES do all the work FOR k=1 TO ALINES(andItems,lc_sele,' AND ') ? k,CHR(9), andItems[k] NEXT>Bingo!
>>lc_sele = "HP%DRUCKER AND (PRICE>100,00) AND (PRICE<200,00)" >>lcTest=Strtran(lc_sele,' AND ',chr(249)) && or some other CHR() value which is never used! >>?GETWORDCOUNT(lcTest,chr(249)) >>>>>Hello,
>>>lc_sele = "HP%DRUCKER AND (PRICE>100,00) AND (PRICE<200,00)" >>>?GETWORDCOUNT(lc_sele," AND ") && return 4 >>>?GETWORDNUM(lc_sele,1," AND ") && return HP% >>>?GETWORDNUM(lc_sele,2," AND ") && return RUCKER >>>?GETWORDNUM(lc_sele,3," AND ") && return (PRICE>100,00) >>>?GETWORDNUM(lc_sele,4," AND ") && return (PRICE<200,00) >>>>>>