Email address validation, is there a way to use Regex or other fuzzy searching?

I would like to use PL/SQL for Email address validation, is there a way to use Regex (regular expressions) or some other fuzzy searching for that? Using % and _ wildcards only take you so far...
I need something that will verify alphanumeric charectors (no ",'.:#@&*^ etc.) any ideas?
Current code:
if email not like '_%@_%.__%' or email like '%@%@%' or email like '% %' or email like '%"%' or email like '%''%' or email like '%
%' then
The last line is to make sure there are no linebreaks in the middle of the email address, is there a better way to signify a line break, like \n or an ascii equivilent?

Michael:
The as noted in the previous post, DBI is a Perl package that allows Perl to talk to various databases, including Oracle. We use DBI on several UNIX servers, and it does not require ODBC, and I have always found it to be extremely quick. Things may be different in the Windows world.
If you are spooling files out to run through Perl anyway, you may want to take a look at DBI. You could probably modify your existing scripts to use DBI fairly easily. The basic structure using DBI is like:
use DBI;
my dbh;       # A database handle
my sth;       # A statment handle
my sqlstr;    # SQL statement
my db_vars;   # Variables for your db columns
# Connect to the database
$dbh = DBI->connect( "dbi:Oracle:service_name","user/password");
$sqlstr = 'SELECT * FROM emp WHERE id = ?' # even takes bind variables
#Prepare statement
$sth = $dbh->prepare($sqlstr);
$sth->execute(12345);  # Execute with values for bind if desired
# Walk the "cursor"
while (($db_vars) = $sth->fetchrow_array()) {
   your processing here

Similar Messages

  • Is there any way to use Quickview from within Spotlight search results?

    I'm sure this has been answered previously, but my searches came up empty....
    Is there any way to use Quickview from within Spotlight search results? I'd like to be able to do a Spotlight search and hit the space bar for a quick Quickview look before actually launching the program. I'm guessing this isn't possible, but thought I'd ask...

    Thanks, Kappy.
    Duh...I meant Quick Look. Sorry about that.
    In any event, pressing the space bar in Spotlight just puts a space in the Spotlight search box - it doesn't open a Quick view of the highlighted item...

  • I recently set up an itunes account and provided my information HOWEVER I also provided an improper email address. Is there any way to recover the information? Please advise. Thanks.

    Like the subject line says - I set up a new account in itunes. Put in my personal information (credit card, address) but - when it came time to provide my email address - I gave one that does not belong to me (similar to my name but not my correct address). Is there any way to retrieve the information I inputted OR put in my correct email address?
    Thanks.

    go to appleid.apple.com.  Click on manage my acct.  sign in using the email you provided (even if it is wrong, it is the one you provided, so technically it is your username.)  Once you sign in, it should have your details right there, it will say "apple ID and primary email address" and to the irgh of that, it will say edit.  choose edit, and provide the correct info.

  • I am sending emails to a Smart Group created in my address book.   The contact in my address book has multiple email addresses.  Is there a way for the email to go to both addresses?  (ex:  work and home email address under one contact)

    In my address book, I have contacts that have multiple email addresses.  (ex:  home and work)   I have created a smart group off of the company name in the contact.  When I send emails, I want it to go to both email address listed in the contact.  Is there a way to make this happen?  Or do I have to have a separate contact for each email address?    

    I will agree with you on this one. Version 31 and all the fixes so far are a mess. Since I have been here answering questions for a little more than a year now I have learned to wait to upgrade until all the dust settles. I see no end to the dust storm version 31 has caused. I am still on version 24.6 and plan on staying there for the duration. At least until the developers comes to their senses and put out a working product.

  • Is there a way to use color and other fonts when emailing or messages that isn't a hassle?

    I would think that people are bored of same font and downloading from other app copy and paste is not ideal plus I want to add color to messages to signify importance of statement. Am I not finding an easy method? After all the emoji was added directly to keyboard, why can't it be that easy?

    It's generally better to stick to plain text for email. Depending on the device an email gets read on, all that fancy formatting can look terrible or render the email unreadable.  It can also slow the downloading of an email to a mobile device. Do your recipients a favor and don't weight your emails down.
    Best of luck.

  • Using Gmail in iPhoto and cannot find any of my groups to email.  I have at least seven or eight groups that I email, each containing over 50 addresses. Is there a way to locate my email groups using iPhoto to send out mail in Gmail? Using version 9.5.1

    Using Gmail in iPhoto and cannot find any of my groups to email.  I have at least seven or eight groups that I email, each containing over 50 addresses. Is there a way to locate my email groups using iPhoto to send out mail in Gmail? Using version 9.5.1  (902.17) OS is Mavericks 10.9.1.

    Your question and description is not very clear to me, so hopefully something here will help:
    1. Gmail is a service not an app or a place. So you need to access the service with an app - that can be iPhoto, Mail, Outlook or any other mail client, or even a Web Browser like Safari or Firefox.
    So you can't "go to GMail" as you write, but instead you go to an application set up to use the GMail service.
    2. iPhoto is not a mail client. It's a handy way to email pics to Grandma, but for what you're doing you need to use an app that supports all of the Gmail service. iPhoto doesn't. There is no way around that.
    3. How to send to groups will vary depending on what app you use to access the GMail service. All of these apps can receive photos from iPhoto, either - as in the case of Mail and Outlook, via the Share function - or, in the case of all the rest - via a Media Browser.
    For help sending to Groups using any of these other apps you need to ask omn their respective forums. But the workflow is quite simple:
    Using Mail or Outlook set in the iPhoto Prefereneces:
    1. Select the pic(s) you want to share.
    2. Choose email from the Share function
    3. Make your selections re size etc
    4. The email opens up in Mail or Outlook
    - from there you need to figure out how to use the email client.
    Using any other app:
    1. In the mail app create a new email
    2. Click on the Attach button or link
    3. Use the Media browser to select the pic(s) you want to send
    4. Attach them
    - from there you need to figure out how to use the email client.
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491

  • BP Email Address validation

    Hi,
    Is there anyway to turn off email address validation which occurs when creating Business partner.
    For example, abc.com@acb is an invalid email id and the system doesnt allow to save BP. But i want to save the BP even though email id is invalid.
    Thanks,
    Karthik.

    Hi Kartik,
    Only way to remove validation is to change the standard code.Go to program LSZA0F33 and comment FM
    SX_INTERNET_ADDRESS_TO_NORMAL.Please refer the below mentioned code.
    *{   DELETE         PDCK902820                                        1
    *\  CALL FUNCTION 'SX_INTERNET_ADDRESS_TO_NORMAL'
    *\       EXPORTING
    *\            address_unstruct    = unstruct
    \           COMPLETE_ADDRESS    = 'X'
    *\       IMPORTING
    *\            address_normal      = normal
    \           local               =
    \           domain              =
    \           COMMENT             =
    \            addr_normal_no_up_with_comment                   "1280i
    \                                = normal_w_umlaut            "1280i
    *\       EXCEPTIONS
    *\            error_address_type  = 1
    *\            error_address       = 2
    *\            error_group_address = 3
    *\            OTHERS              = 4.
    *\  IF sy-subrc <> 0.
    \550i+
    *\    error_table-msg_id     = sy-msgid.
    *\    error_table-msg_type   = sy-msgty.
    *\    error_table-msg_number = sy-msgno.
    *\    error_table-msg_var1   = sy-msgv1.
    *\    error_table-msg_var2   = sy-msgv2.
    *\    error_table-msg_var3   = sy-msgv3.
    *\    error_table-msg_var4   = sy-msgv4.
    \    error_table-fieldname  = 'SMTP_ADDR'.                   "863i
    *\    APPEND error_table.
    \    worst_error = c_error_occurred.                         "863u
    *\    IF g_check_address IS INITIAL.
    \      error_table-msg_type = c_warning_occurred.            "863u
    *\      MODIFY error_table
    \      TRANSPORTING msg_type  WHERE msg_type = c_error_occurred."863u
    \      worst_error = c_warning_occurred.                     "863u
    *\      help_smtp = smtp-smtp_addr.
    *\      TRANSLATE help_smtp TO UPPER CASE.                 "#EC TRANSLANG
    *\      CONDENSE help_smtp.
    *\      p_wa_adr6-smtp_srch = help_smtp.
    *\    ENDIF.
    *\    returncode = worst_error.
    \550i-
    *\  ELSE.
    *\    TRANSLATE normal TO UPPER CASE.                      "#EC TRANSLANG
    *\    p_wa_adr6-smtp_srch = normal-address.
    \    p_wa_adr6-smtp_addr = normal_w_umlaut-address.          "1280i
    *\  ENDIF.
    *}   DELETE
    *{   INSERT         PDCK902820                                        2
    Code inserted
        p_wa_adr6-smtp_srch = unstruct-address.
        p_wa_adr6-smtp_addr = unstruct-address.

  • Help needed in email address validation !

    Hi all,
    I am developing a web page in which there is a text box and a submit buttion. User enters his email id and clicks the button. As soon as the button is clicked, the email- address validation should be done.
    some thing like,
    only one @ shold be there,
    the address should terminate with .net, .com, .org.....
    there should not be any special characters like / , ?, < > \ etc..;
    It should be in JSP or JAVA Script
    Can anyone help me ????
    Regards
    AShvini

    function validateEmail(email) {
        // A very simple email validation checking.
        // you can add more complex email checking if it helps
        var splitted = email.match("^(.+)@(.+)$");
        if(splitted == null) {
            return false;
        if(splitted[1] != null ) {
            var regexp_user=/^\"?[\w-_\.\']*\"?$/;
            if(splitted[1].match(regexp_user) == null) {
                    return false;
        if(splitted[2] != null) {
            var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
            if(splitted[2].match(regexp_domain) == null) {
                var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
                if(splitted[2].match(regexp_ip) == null) {
                        return false;
            }// if
            return true;
        return false;
    }Here's one in JS. A little bit of modification could make it suited to your requirements!

  • EMail Address Validation - Shell Script

    Hi,
    I have a custom concurrent program (Shell Script Program). One of the input parameter is Email address.
    In my code, I need to validate email address format (Ex: [email protected])
    Can anyone paste the code snippet.
    I have tried with the below validation
    case $EMAIL_ID in
         *@?*.?*) echo "Email Address Validated.";;
         *) echo "Invalid Email Address. Please enter the correct format of email address and re-run the program";
    exit 1;;
    esac
    This validation is failing in this scenario xxx,[email protected] / xxx [email protected] (If user enters the email address with comma or a blank space. This validation is returning success message)
    Regards
    BS

    Please look up the syntax for this by typing
    man mailx
    on the shell command prompt.
    Please stop asking Unix specific questions in an Oracle forum. There are more than enough Unix forums on the Internet.
    Please refrain from asking further doc questions here.
    You are in gross violation of the 'Forums Etiquette' post.
    Sybrand Bakker
    Senior Oracle DBA

  • Email address validation with JavaMail

    Hi there,
    Does anyone know whether the JavaMail library provides any means to validate email addresses? My first thought was to use the AddressException but this doesn't work. I was able to construct address such as
    InternetAddress a1 = new InternetAddress("foo");
    InternetAddress a2 = new InternetAddress("--------foo---------");
    InternetAddress a3 = new InternetAddress("?$@%##$%??%$$#");
    without the AddressException being thrown... Any comments would be appreciated.
    Regards,
    Arman

    I use this simple test and is does the trick for me.
    * @param address :string met email adress zoals
    [email protected]
    * @return      :true valid address, false invalid
    address.
    private static boolean validmailadress(String address)
    // address should must have a length of minimal 3
    examp: a@b
    if (address.length()<3) return false;
    if(address.indexOf("@")==-1) return false;
    return true;
    Regards,
    Wil.I think this is wrong. Take for example, would you call this valid?
    abc@abc
    Your code will call this valid, but to you and, it is very wrong. All you have to do is check that there is a '.' anywhere after the '@' and there is something after that.
    Well, I will write one and post it here later.

  • Is there a way of using a mail merge function while on the iphone or ipad, i wish to email a "Word style, ot TXT" document to 250 of my contacts

    Is there a way of using a mail merge function while on the iphone or ipad, i wish to email a "Word style, ot TXT" document to 250 of my contacts, I have tried downloading my contacts to my PC's outlook but only 1 contact comes across at a time despite the fact that Icloud says downloading namedperson + 249 other contacts to a CSV file

    Hi everyone!
    Looking also for an app that allows me to merge email and send them out to each recipient individually. Apparently that's not possible yet. Here's what the guys at RedbitsApps told me about Group Email capabilities: 
    "The current version of the app relies on the device operating system to send the emails. For this reason, sending individual email instead of a single email to multiple recipients is not possible. Apple doesn't allow apps to send single emails to many recipients easily. We may use a custom sending software in a future version."
    Let's keep looking guys... 

  • Exchange active synch - I keyed the wrong passcode and now it is not asking for a passcode just tells me that I cannot access my business email.. Is there any way to reset ?

    Exchange active synch - I keyed the wrong passcode and now it is not asking for a passcode just tells me that I cannot access my business email.. Is there any way to reset ?

    press and hold both the power and home buttons until the apple logo appears and then let them go.  Wait till the phone restarts and then try

  • I want to change my primary e-mail address that I use with Apple ID - help guide says Select Edit next to "Apple ID and Primary Email Address." But there is no 'edit' on that section there is on every other but not that one. Can anyone help?

    I want to change my primary e-mail address that I use with Apple ID - help guide says Select Edit next to “Apple ID and Primary Email Address.” But there is no 'edit' on that section there is on every other but not that one. Can anyone help?

    You can create an alias @icloud.com email address within your current account that will receive email in your current iCloud inbox (see http://help.apple.com/icloud/#/mm6b1a490a).  (@me.com addresses are no longer available as new addresses.)  Just be aware that you cannot use an alias address later to create a new iCloud account or move it to a different account.
    Also, even if you created a new iCloud account with a new ID, your existing purchases would not be lost.  They are permanently tied to the original ID you used to purchase them.  You can also continue to use the existing ID for the iTunes store; it does not need to be the same as the ID you use for iCloud.

  • Is there a way to use a bookmark from Maps as the home/work address of a contact?

    I'm trying to use location-based reminders. But the Home and Work addresses I have in my own contact card are not recognized by Apple Maps.
    Is there a way to use Apple Maps to set the Home and Work addresses in my contact card to something that it will be able to understand?
    Edit: It doesn't have to be with Apple Maps. Google Maps or any other service where I can bookmark my "Current Location" would be fine. I just want an effieient way to use Location-based reminders when manually inputting an address is not an option, but locating it on a map is.

    Unfortunately there is no way to do that current stage , you would need to add the tags manually.
    Thanks,
    Sanjit

  • Hi, both my husband and I have iphones synced to my apple id. It seems that we can't facetime due to this as it's like my email address is calling my email address! Is there anyway to fix this or will we need to create a new id for my husband's phone?

    Hi, both my husband and I have iphones synced to my apple id. It seems that we can't facetime due to this as it's like my email address is calling my email address! Is there anyway to fix this or will we need to create a new id for my husband's phone?

    settings - facetime - remove the apple id, on your husband phone.
    He should create his own id for imessage and facetime.

Maybe you are looking for