Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Web Buyers Guide
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Application developers can seamlessly integrate the Advantage Database install with their application install. Learn the best practices used when setting up silent installs with this seminar.
  #1  
Old August 29th, 2003, 11:48 AM
jhiza jhiza is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: CO
Posts: 25 jhiza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 0
Send a message via AIM to jhiza Send a message via Yahoo to jhiza
email validation in pl/sql

i know that pl/sql's strong point is not regular expressions, and i'm well aware of better solutions to do this.

given my requirements per employer, email validation will need to be done in the pl/sql layer. i'd like to implement RFC822/RFC1035 for email validation and was wondering if anyone had some code that does this?
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #2  
Old August 29th, 2003, 11:53 AM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,294 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 43 m 23 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
what is pl/sql's? If by 'pl' you mean PERL, then you are mistaken - regular expressions and pattern matching are exactly what the language is meant for.

As for a PCRE to match am email address, you'd better search the forums or do a google. This is perhaps the most common implementation of regular expressions in the history of mankind.

christo

Reply With Quote
  #3  
Old August 29th, 2003, 01:03 PM
jhiza jhiza is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: CO
Posts: 25 jhiza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 0
Send a message via AIM to jhiza Send a message via Yahoo to jhiza
not perl. pl/sql.

i posted this in the oracle forum because pl/sql is specific to oracle.

Reply With Quote
  #4  
Old August 29th, 2003, 01:33 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,294 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 43 m 23 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
my bad - over to the 'pl/sql' experts

Reply With Quote
  #5  
Old August 30th, 2003, 05:09 PM
hedge hedge is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2002
Posts: 692 hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 20 h 2 sec
Reputation Power: 19
Don't know of any reg expression code available in pl/sql. How about if you wrote a java function that could be called by the pl/sql?

Reply With Quote
  #6  
Old September 3rd, 2003, 10:39 AM
martysb martysb is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Austin, TX
Posts: 9 martysb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to martysb
owa_pattern

If you happen to be running Oracle Web Apps, you could use owa_pattern, for regex matching. Or use javascript within the pl/sql block. I haven't done this myself, though the javascript option is in heavy use at my office.

You can find the documentation on owa_pattern at
Oracle's doc site

Hope this helps a bit,
Marty
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #7  
Old September 3rd, 2003, 11:11 PM
crimson117 crimson117 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: New York
Posts: 19 crimson117 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to crimson117 Send a message via AIM to crimson117 Send a message via Yahoo to crimson117
I don't know how strong your validation needs to be, but you can probably easily use substr() and a For loop to check that there are:
-some numbers/letters/periods
-followed by one @ symbol
-followed by some more numbers/letters
-followed by a period and a valid extension, such as .net, .org, .com, .co.uk, etc.

Basically figure out what your validation rules are, and then use substr to break the varchar2 into pieces, then check the pieces.


And for those who don't know, here's some background info courtesy of Orafaq.com:
What is PL/SQL and what is it used for?
PL/SQL is Oracle's Procedural Language extension to SQL. PL/SQL's language syntax, structure and data types are similar to that of ADA. The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance). PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database.
(http://www.orafaq.com/faqplsql.htm)
Comments on this post
Gran Roguismo agrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > email validation in pl/sql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

ibm




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway