I am trying to find double dots, if consecutive double dot exits in any email it should prompt me with "NO"
DECLARE
v_email webowner.person.email%TYPE;
v_constant CONSTANT VARCHAR2(300) := '^(([a-zA-Z0-9"_\-])([a-zA-Z0-9_\.\/%+="''\-]*[a-zA-Z0-9])@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\]))$';
BEGIN
v_email := '[email protected]';
if regexp_like(v_email, v_constant) then
pl('YES: ' || v_email);
else
pl('NO: ' || v_email);
end if;
END;
Note: Double dot means consecutive dots and presence of double dots needs to be checked before "@"
Tried using Regex that does not allow consecutive dots
Could not find the proper placement of regex.
Kindly help.
([a-zA-Z0-9"_\-])([a-zA-Z0-9_\.\/%+="''\-]*[a-zA-Z0-9])with[a-zA-Z0-9"_-]+(\.[a-zA-Z0-9_/%+="''-]*[a-zA-Z0-9])*