11.7
Having strings like this:
e:\progress\{MedlemsNr}\logg{Klientnr}
where {xxxx} is elements that I need to pick and check, what whould be the easiest way doing that?
I could use do i = 1 to num-entries(stringX,'{'):
Element = '{' + substring(entry(i,stringX,'{'),1,index(entry(i,stringX,'{'),'}').
but I wonder if there is other ways that could be easier?
//Geir Otto
I would probably used '}' instead to test for elements....
I do:
inNE = NUM-ENTRIES(data,'~{').
DO inInd = 1 TO inNE:
toTest =ENTRY(inInd,data,'~{').
IF NUM-ENTRIES(toTest,'}') LE 1 THEN /* it should never be LT 1.. but..*/
NEXT.
found = ENTRY(toTest,'}').
END.
I just found I've asked same question here