1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
w_x_text := 'Cible : vvvv DO tttt / vvv / DO123456789</p>';
w_t_donnees.extend(2);
w_t_donnees(1) := 'DO';
w_t_donnees(2) := 'MA';
if instr(w_x_text, 'Cible') > 0 then
w_n_positionDep := instr(w_x_text, 'Cible');
w_n_positionFin := instr(w_x_text, 'Cible') + length('Cible');
for j in 1..w_t_donnees.count loop
while (w_x_utilFormEmailEtu is null or w_n_new_position = 0) loop
w_n_new_position := instr(w_x_text, w_t_donnees(j),w_n_positionFin);
w_n_new_positionFin := instr(w_x_text, w_t_donnees(j),w_n_positionFin) + length(w_t_donnees(j));
if w_n_new_position > 0 then
w_b_result := true;
while (w_b_result) loop
w_x_utilFormInter := substr(w_x_text,w_n_new_positionFin, 1);
if w_x_utilFormInter in ('0', '1', '2', '3', '4', '5','6', '7', '8', '9') then
w_x_utilFormEmailEtu := w_x_utilFormEmailEtu ||w_x_utilFormInter;
else
w_b_result:= false;
end if;
w_n_new_positionFin := w_n_new_positionFin + 1;
end loop;
end if;
end loop;
exit when w_x_utilFormEmailEtu is not null;
end loop;
end if; |
Partager