How could I get parts of a string using a PROCEDURE?
For example, I receive a string containing the email address: name@email.com

I want to separate each information from the email on a line:

Address: name

Domain: email

location: .com

I tried using SUBSTR but I was only able to return the first information.

```
set serveroutput on;
    create or replace procedure pr_getsubstring (email varchar2)
    as
    text varchar2(300) := 0;
    begin
        for x in 1 .. length (email) loop
        if substr (email, x, 1) = '@' then
            DBMS_OUTPUT.PUT_LINE ('Address:' || text);
            exit;
            else text: = 'Address:' || text || substr (email, x, 1);
            end if;
        end loop;
    end;

    call pr_getsubstring('hello@word.com');

```

Result returned:

Address: hello

Expected outcome:

Address: hello

Domain: word

Local: .com