Solved

regexp in SQL

Posted on 2006-07-12
2
715 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
2 Comments
 
LVL 19

Expert Comment

by:actonwang
Comment Utility
>>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 125 total points
Comment Utility
>>> 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now