-- Proposito : Devuelve un email dentro de una cadena de texto.
-------------------------------------------------------------------------------
FUNCTION get_email_from_texto (v_texto IN VARCHAR2) RETURN VARCHAR2 IS
v_email VARCHAR2(500);
BEGIN
SELECT REGEXP_SUBSTR(v_texto,'([a-zA-Z0-9_+*$%\^&!\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9:]{2,4})+')
INTO v_email
FROM dual;
RETURN v_email;
EXCEPTION
WHEN OTHERS THEN RETURN NULL;
END; |
-- Proposito : Devuelve un email dentro de una cadena de texto.
-------------------------------------------------------------------------------
FUNCTION get_email_from_texto (v_texto IN VARCHAR2) RETURN VARCHAR2 IS
v_email VARCHAR2(500);
BEGIN
SELECT REGEXP_SUBSTR(v_texto,'([a-zA-Z0-9_+*$%\^&!\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9:]{2,4})+')
INTO v_email
FROM dual;
RETURN v_email;
EXCEPTION
WHEN OTHERS THEN RETURN NULL;
END;