IN_NUMBERS = REPLACE(:IN_NUMBERS,'(','°');
IN_NUMBERS = REPLACE(:IN_NUMBERS,')','`');
I=0;
NUMBER_C = NULL;
NUMBERS = NULL;
while (:I<CHAR_LENGTH(:IN_NUMBERS)) do
begin
I= :I+1;
NUMBER_C = SUBSTRING(:IN_NUMBERS FROM :I FOR 1);
--
EXCEPTION EXCEPT_LEER NUMBER_C;
if (:NUMBER_C SIMILAR TO '°') then
begin
NUMBERS = :NUMBER_C; -- ( auslesen
I=:I+1;
--
EXCEPTION EXCEPT_LEER NUMBERS;
while (:I<CHAR_LENGTH(:IN_NUMBERS)) do
begin
NUMBER_C = SUBSTRING(:IN_NUMBERS FROM :I FOR 1);
IF (:NUMBER_C SIMILAR TO '[[:ALPHA:]]') THEN
begin
NUMBERS = NUMBERS || :NUMBER_C; -- Nach der ( Buchstabeninhalt auslesen
end
else IF (:NUMBER_C SIMILAR TO '`') THEN
begin
NUMBERS = NUMBERS || :NUMBER_C; -- ) auslesen
IN_NUMBERS = REPLACE(:IN_NUMBERS,NUMBERS,NUMBERS||'^'); -- zur Trennung ^ setzen
break;
end
I=:I+1;
end
end
end