If there is only one occasion of the character(s) you can use;
if remainder (instr({@abc},{?look up}),2)=1
then do this
else do something else
If there are multiple occasions of the string, the following loop will check each occurance of the string. The loop will search for any size string. (within the Crystal limits of course). The loop will also indicate whether the searched for string is present in the original.
change the following fields:
{abc} to the string you are evaluating,
{look up} to the field or string you want to check for,
stringvar check:={abc};
numbervar loop;
stringvar what:={look up};
numbervar lngth:=length(what);
stringvar a;
if instr(check,what)<> 0 then (
for loop:= 1 to length(check) do(
if instr(check[loop to length(check)],what)<>0 then
(if (check [loop to loop + lngth-1] = what and
remainder(loop,2)=1) then
(a:="okay" ;loop:=loop+lngth+1) else
if (check [loop to loop + lngth-1] = what and
remainder(loop,2)=0) then
(a:="error" ; loop:=length(check)))
else (loop:=length(check)));a)
else "string not found"
Mike