Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

regexp in SQL

Posted on 2006-07-12
2
Medium Priority
?
728 Views
Last Modified: 2008-02-01
SELECT REGEXP_SUBSTR('Go to http://www.oracle.com/products and click on database',
'http://([[:alnum:]]+\.?){3,4}/?') RESULT
FROM dual;
Can some body explain what this is doing?
output : http://www.oracle.com/


What exactly +, \. , \n  do .
Thanks
0
Comment
Question by:avi_ny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:actonwang
ID: 17092052
>>http://([[:alnum:]]+\.?){3,4}/?

     it is a reg expression.

     it matches.
     http://  then 3 or 4 set of   alphanumeric charachters ending with . (\. because . is a special character) plus a '/' (optional because of ?).
0
 
LVL 23

Accepted Solution

by:
paquicuba earned 250 total points
ID: 17092634
>>> What exactly +, \. , \n  do .

+   Matches one or more occurrences of the preceding subexpression

\.  Escape Character:  Treat the subsequent metacharacter in the expression as a literal.
                                 Since "." ( dot ) has a special meaning within the context of a regular expression, you
                                 must use "\" (Escape Character) to treat "." (dot) as a literal.

\n  Backreference:  Matches the nth preceding subexpression, where n is an integer from 1 to 9.
 
 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question