Validation of e-mail addresses

Hello the Experts of Oracle

Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options

I have a few email addresses syntax to validate. I did some of my homework but I need expert advice.

I have not yet completely serached the Oracle forum. If someone did or led in the validation of email address please send me the link. I will be grateful


With tab as
(
SELECT "Jbond008 @[email protected]" email from dual Union All
SELECT ' jbond... [email protected]' an email from dual Union All
SELECT ' jbond.008@yahoo... com' an email from dual Union All
SELECT 'Jbond009@hotm%%il.com' Union double, All email
SELECT '[email protected]' Union double, All email
SELECT ' ^ * @hotmail.co.in () ' email from dual Union All
SELECT 'abc@hotmailcoin' Union double, All email
SELECT '[email protected]' From Dual email
)
Select * from tab where
not REGEXP_LIKE (upper (trim (EMAIL)), "[A-Z0-9_%-]+@[A-Z0-9._%-]+\. [A - Z] {2,4} ")"
or regexp_count (upper (trim (EMAIL)),' @') > 1



Validates the rules I have are:

1. no two sign an email address @.
2 No. two period (.) in an e-mail
3. after sign @ no special character or numeric character not only Alphabets
4 at a before @ sign character should be alpha or numeric
5. at least one period should be there after the sign @.
6. the last email address (@Abc.office) must be valid



Thanks for the help/tips

Rajesh

Published by: 792498 on September 2, 2010 12:55

Hi, Renon,

I saw not as rigorous as that desired e-mail validation request.

It would be much easier in PL/SQL, but performance will be slower.

If you want to do in pure SQL, I suggest to use the test in a CASE statement, so that you can see easily all channels of test and the results of each.
Comment by your regular expressions, like this:

SELECT        email
,       CASE
          WHEN  REGEXP_LIKE ( UPPER ( TRIM (email))
                            , '[A-Z0-9_%-]+'     || -- 1 or more common characters
                        '@'               || -- @ sign
                        '[A-Z0-9._%-]+'     || -- 1 or more common characters
                        '\.'          || -- dot
                        '[A-Z]{2,4}'        -- 2 to 4 letters
                      )
          THEN  'Good'
          ELSE  'Bad'
       END               AS outcome
FROM        tab
ORDER BY  email
;

It is good to use conditions composed, such as

WHEN  REGEXP_LIKE (...)
OR    regexp_count (upper(trim(EMAIL)),'@') > 1

If that helps. In this case, it is quite easy to test for exactly a sign in the expression of REGEP_LIKE @. (Also, I think you wanted to say "= 1" ", not > 1".)

When you say "2. No two period (.) in an e-mail", you mean not two * consecutive * periods, right? Addresses like "[email protected]" are in agreement.
In this case, you can start to refine your model like this:
{code}
SELECT E-mail
CASE
WHEN REGEXP_LIKE (UPPER (TRIM (email))
, '[A-Z0-9_%-]+'     || -1 or most common characters
' (' || -a group consising of...
'\.'          || -a simple point
'[A-Z0-9_%-]+'     || -1 or most common characters
')*'          || -the Group may be repeated 0 or more times
'@'               || -sign @.
'[A-Z0-9._%-]+'     || -1 or most common characters
'\.'          || -point
'[A Z] {2,4}' - 2 to 4 letters
)
CAN 'good '.
OTHER 'bad '.
AS END result
TAB
ORDER BY e-mail
;
{code}
As always, take baby steps. Add some characters to the model, then test it, to ensure that these characters are what you expect.

Published by: Frank Kulash, Sep 2, 2010 14:24

Tags: Database

Similar Questions

  • Request to validate the valid e-mail address?

    I received a request by electronic mail NOR community click on a link to validate my e-mail address.  Given we were attacked Cyber, phished, etc. several times the link looked suspicious.  NEITHER community sends requests for validation of e-mail addresses or is this another attempt of potential cyber attack?  I can send a copy of this email to OR if you can provide me with an e-mail address.

    MetManager wrote:

    NOR community sends requests for approval of... email addresses?

    Yes - https://decibel.ni.com/content/groups/ni-community-help/blog/2013/02/11/e-mail-verification

  • F & G Committee < ' F & G Committee' > is not a valid e-mail address because it is not the form user@host. You need to correct before sending the e-mail message.

    Out with the new v.31.1.0, the: 2 September 2014 version of Thunderbird, I can email is no longer a list of recipients, getting the error msg: F & G Committee < ' F & G Committee' > is not a valid e-mail address because it is not the form user@host. You need to correct before sending the e-mail message. In earlier versions, the addresses of individual e-mail in the list (F & G Committee in this case) are automatically placed in as the e-mail is sent. Is there a solution to this problem?

    Read this.
    https://support.Mozilla.org/en-us/questions/1019019

  • Valid e-mail addresses

    I'm trying to set up a list of e-mail addresses that can send to my printer (Photosmart 6520). As it is, the list contains my primary e-mail (?). I can add other addresses to the list and the dialog box seems to accept when I click on "Save". However, whenever I have to disconnect and connect again, all addresses have disappeared from the list - unless my main address - and every time I put in new.

    Now, I found that when I go to ePrint-properties, for the first time, the dialog box populates the list with all the emailaddresses who previously to send an e-mail to the printer - whether they are valid or not - and these addresses REMAIN in the list! Don't tell me that this is the way to add addresses to it!

    So, how do I add addresses to the list and have their STAY IN THE LIST until I REMOVE them?

    Willem Vermeer

    Hi Willem.

    I would try the method below.  Some users have found this method works for them.

    1. connect to ePrint Center

    2. click on the senders list and add the user as usual.

    3. click on Save icon after the addition of address - do not sign off ePrint Center.

    4. then send an email to the printer from this sender you just added.

    5. once the e-mail has been received by the printer disconnect and then come back in ePrint center and check the list of senders.

    Let me know how it goes.

  • What are valid characters in an e-mail address? How to filter on the email addresses that use '? ' and ' * '?

    I'm doing some proactive cleaning the contacts whose e-mail address contains characters that are questionable - such as

    Unfortunately, I found that I can't create filters for addresses that contain? or * because these two characters are treated as wildcards (? is for a single wildcard character, and * is the joker of several characters).

    Someone at - it suggestions on how I can filter for a group of e-mail addresses containing one of these characters?

    Update: open a folder with support - special characters * and?  are not allowed in the domain of the email address part.  That's what is validated during creation.

    It is also not really any EASY way to get those email addresses that contain these characters - I can create filters that will shoot only so many email addresses and then filter through Excel.  This is going to be painful because I have several million in our database.  I may be able to get many of them through other criteria (lack of activity, rebounds, etc.), so I'll probably wait on them.

  • Hi, the creative cloud continues to send my inactive email account validation e-mail. How can I change the e-mail address for verification

    Hi, the creative cloud continues to send my inactive email account validation e-mail. How can I change the e-mail address for verification

    email https://forums.adobe.com/thread/1446019 or

    -http://helpx.adobe.com/x-productkb/global/didn-t-receive-expected-email.html

  • Validation of a batch of up to three e-mail addresses

    Hello!

    The users of my site have a primary e-mail address, and sometimes one or two e-mail addresses.

    Until then, of course, they had to change their primary address.

    But now I would like to offer them the possibility to have up to two other addresses.

    The interface presents, in order:

    a - active main address

    b the first active substitute (if applicable)

    c the second alternate active (if applicable)

    User can enter up to three addresses in three fields if displayed alongside those who are currently used addresses

    All three addresses must be different from each other.

    Until then, nothing very difficult, as I had only one address to verify.

    But there are now three of them to check!

    The names of the two fields of entry for other addresses are: newFirstAltFld and new SecondAltFld

    How can I perform this task?

    Thank you very much in advance for your help!

    PS: Sorry for the channels in french, but it does not matter anyway (I hope!)

    Code I use at the moment:

    define an array to store the errors found when using the validateEmail function

    var errorsValidateEmail:Array = new Array();

    This function is to validate the e-mail address

    validateEmailFct = function () {}

    If (newEmailFld.text.indexOf("@") < 2) {}

    errorsValidateEmail.push ("< font color =' #FF0000 ' >-symbol-" < b > @ < /b >------"is missing or misplaced.) < station > ");"

    }

    If (newEmailFld.text.lastIndexOf(".") < = (newEmailFld.text.indexOf("@") + 2)) {}

    errorsValidateEmail.push ("< font color =' #FF0000 ' >-a point-" < b >. < /b >------"is missing or misplaced.) < station > ");"

    }

    If (newEmailFld.text.length < 8) {}

    errorsValidateEmail.push ("< font color =' #FF0000 ' >-L' address provided is too short.") < station > ");"

    }

    };

    email validation

    validateFormFct = function () {}

    errorsValidateEmail.length = 0;

    validateMailFct();

    If (errorsValidateEmail.length > 0) {}

    errorMsgFld.html = true;

    errorMsgFld.htmlText = "< font color ="#FF0000"> the following errors remain: < br / > < / police > ';

    var i = - 1;

    While (++ I < errorsValidateEmail.length) {}

    errorMsgFld.html = true;

    errorMsgFld.htmlText += [i] errorsValidateEmail + newline;

    }

    }

    else {}

    verifEmailFct(); / / to check the domain name and validity (if already used or if invalid) of the new email address, not shown here, but it works, I swear!

    }

    };

    There is nothing "not very smart" everything you've done.  Anyone trying to solve something rather than hoping to put him them something very intelligent is the best way to learn in my opinion.

    An example of a way to implement an approach to table/loop...

    var fields = new Array (newEmailFld, newFirstAltEmailFld, newSecondAltEmailFld);

    var fieldIDs = new Array ("Main address", "Option 1", "Alternative 2");

    validateMailFct = function () {}

    for (i = 0; i

    If (fields [i].text.indexOf ("@"))< 2)="" {="" 2)="">

    errorsValidateEmail.push ("- symbol-" '@------"is missing or misplaced.) ()"+ fieldIDs [i] +")"); '"

    }

    If (fields [i].text.lastIndexOf ("."))<= (fields[i].text.indexof("@")="" +="" 2))="">

    errorsValidateEmail.push ("- UN point-" '. -"is missing or misplaced.) ("+ fieldIDs [i] +")"). ;

    }

    If (fields [i].text.length< 8)="">

    errorsValidateEmail.push ("- the address is too short.) ()"+ fieldIDs [i] +")"); '"

    }

    }

    }

  • Validation script to match in a field course another (to check e-mail address)

    Hey everybody,

    I have an Acrobat X form that I'm working on.  Two of my fields are:

    Email address

    and

    2 email address

    I have a validation script in place under the email address to ensure that the user enters a properly structured e-mail address.

    I need an Email address 2 validation script that makes sure that everything they enter matches what was entered in the field email address.

    Someone at - it script alreafy built for this?

    Thank you.

    If you want to test an exact match, you could do something like:

    Get the value of the first e-mail address

    em1 var = getField("Email_Address").valueAsString;

    See if the value of this field to the other, but only if this field is not empty

    If (event.value & event.value! == em1) {}

    App.Alert ("your error goes here.", 3 ");

    }

    You could add code to reject the value (event.rc = false) or do a case-insensitive comparison by converting two lowercase field values.

  • Validation of an element containing the e-mail address

    Hello

    Anyone developing the chain of validation for the e-mail address elements? I saw the validation of the URL, validation of IP addresses, same date and phone numbers...


    Thank you very much!

    Hello
    Check out this site:

    http://RegexLib.com/DisplayPatterns.aspx

    There are many different regular expressions for validation.
    Hope that helps.
    -Marc

  • MSN account has been blocked, and all valid for get info to reset attempts are not received to my alternate e-mail address

    Hello - I use abrand new account just to register for this problem. My account * address email is removed from the privacy * was blocked - I filled out a form of reset for my alternate e-mail address, but nothing up there. I then retried and and filled out a background form thanks to the regulator blocked to prove my payment options and email of recent information to prove who I am. Still not reset info received to the alternative e-mail address. Today, I tried again and there is no control of the blocked page but my password does not work and I do not have information received to the alternative e-mail address. I understand that you can have some resets sent to mobiles but I can't this configuration. Finally, I asked a password reset today and no still no reception to alt address. Help! You will need to get mail NOW. I pay for this service, but there is no support and I didn't ask for this remove - what number should I call to get this sorted out instantly or, Alternatively, to close the account that I do not pay for a service that does not work... Report as abuse

    This is not an appropriate forum to do so, however...  You want to see what I'm about to post to make sure that you have not missed something...

    You talk directly to Microsoft here.  It is - for the most part - a peer-to-peer forum (those, like you, are simply users of Microsoft products).

    You could go through this article - make sure you have done everything...
    http://www.itechwhiz.com/2011/04/account-recovery-reset-Windows-Live.html

    And someone is probably going to put these links here also:
    Windows Live Solution Center - HotMail - HotMail Forums Solutions
    http://windowslivehelp.com/
    Hotmail - Forums
    http://windowslivehelp.com/forums.aspx?ProductID=1

    Hotmail - Solutions
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    How to contact Windows Live Hotmail Support
    http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm

    Windows Live Hotmail Top issues and Support information
    http://support.Microsoft.com/kb/316659/en-us

    Compromised account - access unauthorized account - how to recover your account
    http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41

    Hotmail hacked? Take these steps
    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

  • This error window appears every time I have send an email. The e-mail address is not a valid email address. I don't know where to delete this. I tried to look online to object, but also other research.

    The message could not be sent. The authentication setting are may not be wrong for your e-mail [SMTP] Server outgoing. To resolve this issue, go to help, search for "Troubleshoot Windows Mail" and read the section "I have problems sending e-mail". If you need help to determine the appropriate server settings, contact your e-mail service provider.

    The rejected e-mail address was ' * address email is removed from the privacy *'. "Are subject: movement of Winnebago, IT ', account: 'imap.aol.com', server: 'smtp.aol.com', Protocol: SMTP, server response: ' 550 5.1.1 E4.13 box to the LETTERS NOT FOUND ', Port: 587, secure (SSL): no, Server error: 550, error number: 0x800CCC79

    Also, did you put a check mark on "my server requires authentication"?

    1. When you return to the dialog box accounts Internet, click on the Mail tab (if the dialog box going Internet is not open, click the Tools menu and then click accounts).
    2. Select your AOL IMAP account.
    3. Click on Properties.
    4. In the Properties dialog box, click the servers tab.
    5. In the outgoing mail server section, click the box my server requires authentication .
    6. Click apply.

    t-4-2

  • Hi our friend has an old e-mail address on his old phone and e-mail account is now closed he should drop his photos and has a new email address, how he retrieve it please

    Hi our friend has an old e-mail address on his old phone and e-mail account is now closed he should drop his photos and has a new email address, how he retrieve it please

    Even if the e-mail account is closed the Apple is still valid. If he has forgotten the password, see: If you forgot your Apple ID - Apple Support password

    What follows has instructions on how to change the e-mail address he serves his Apple ID: change your Apple - Apple Support ID

  • I installed the fix for bug TB31.1 and now my e-mail lists do not work because TB does not recognize it as a reference to a list of e-mail addresses.

    I get an error message that says:

    < "list name" > list name is not a valid e-mail address because it is not the form user@host. You need to correct before sending the e-mail message.

    It is true for lists I often used in new buildings, old and new of these lists since the upgrade.

    Well, it of a regression and pointed out that the Bug #1060901. If you have a Bugzilla account, please consider voting for this question.

    Several other people have sent in the same request of support you, noting that it happened after they upgraded to version 31.1.

    The exact error message is: XXXX is not a valid e-mail address, because it is not the form user@host. You need to correct before sending the e-mail message.

    This happens in Thunderbird 31.1.0 when the description of your mailing list includes several words separated by spaces.

    Well that isn't ideal, these workaround solutions should allow you to use your mailing lists until a proper fix is implemented:

    • All by composing an email open the address book and select the list you want to send, to highlight all the names in the list and drag them to the To: box. This example uses your existing data without changing it.
    • Replace white "" between the words in the descriptions of these lists with an underscore "_". This requires modification of your descriptions of mailing list (s).
    • Upgrade to an earlier version and disable automatic updates (Windows)

    On the automatic updates

    Automatic updates are by default in Windows.

    You can Customize this behavior, however, it is under Tools > Options > advanced > update.

    My suggestion would be to put to check for updates but let me choose weather to install., especially if you depend on critical business e-mail / important or personal questions.

  • When I start to type in a name Thunderbird offers e-mail addresses, some outdated and I would like to delete those.

    Stupid Thunderbird. Details. I start typing a name of person that I want to send an email. Thunderbird retrieve an e-mail address. In some cases, this email address is no longer valid, but he always appears as the first choice (and I end up sending a message that bounces). I deleted these invalid addresses in my address book, but Thunderbird is still in. Tell me how to remove them.

    You can find them in your address book and remove them. Thunderbird get suggestions from one of your address books. You have at least two books by default. Staff and collected books.

  • When I try to set up the synchronization and open an account, I get the invalid e-mail when I start typing my e-mail address.

    not valid email appears when I try to set up the synchronization

    Just keep tapping until the e-mail address is typed completely.

Maybe you are looking for

  • Manufacturing appt

    I'm trying to set up a store in appointment because my phone stopped vibrating and I can't do it via the menu of repair

  • AT100 - request password

    My AT100 asks for a password after a longer than normal to start. It is not the normal start page that appears, so I assume that I tried to sign up for "gmail" or similar and it is this password he wants (that I don't know!). The reset is not possibl

  • Bug of multitasking on the iphone 5 s

    Hello world! So, I had a problem with iOS 9. I use it on my own i5s. So my problem: I have a video off the record in safari. And if I'm done, I close the tab, and the application too. But if I open the multitasking with 2 x click Landscape (since an

  • Cool fan has stopped working - laptop HP Pavilion dv7-6c95dx

    The colling fan has stopped working properly. After research, I learned that it is a COMMON problem for this laptop in particular. Of course my warranty just expired 2 months ago... so... I need info on this exact model fan, with that I need to repla

  • How to back up files without a graphical interface to see for

    GUI of my laptop no longer works, with the exception of half of a centemeter at the top of the screen of the laptop shows hash instead of the GUI.  Operating system is windows 7 64 bit. Is there an automated process, I could use to back up my files,