as a match regex exercise, you could do...
$test:=Method1 ("abcdefghijklmnopqrstuvwxyz";\
Character code("k");Character code("m");\
Character code("d");Character code("y"))
//dklmy
> // ----------------------------------------------------
> // Method: StringOmit
> // - Uses REPLACE STRING* to clear characters
> // INPUT1: Text - to strip
> // INPUT2: Longint - lowest allowed character code
> // INPUT3: Longint - highest allowed character code
> // INPUT{4}: Longint - additional allowed character codes
> //
> // OUTPUT: Text - with remaining characters
> // ----------------------------------------------------
>
> C_TEXT($1;$in;$0;$out)
> C_LONGINT($2;$3)
> C_LONGINT(${4})
>
> C_LONGINT($i;$pos;$len)
> C_TEXT($min;$max;$motif)
>
> $min:="\\u"+Substring(String($2;"&x");3)
> $max:="\\u"+Substring(String($3;"&x");3)
>
> $motif:="["+$min+"-"+$max
>
> For ($i;4;Count parameters)
> $motif:=$motif+"\\u"+Substring(String(${$i};"&x");3)
> End for
>
> $motif:=$motif+"]+"
>
> $in:=$1
>
> $i:=1
>
> While (Match regex($motif;$in;$i;$pos;$len))
> $out:=$out+Substring($in;$pos;$len)
> $i:=$pos+$len
> End while
>
> $0:=$out
>
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************