1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Between two strings

Discussion in 'SQL PL/SQL' started by jhonnyrip, Oct 25, 2017.

  1. jhonnyrip

    jhonnyrip Active Member

    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    90
    Location:
    lansing
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    733
    Likes Received:
    143
    Trophy Points:
    830
    Location:
    Russian Federation
    It is simply...
    Code (Text):

    WITH exmpl (str) AS (SELECT 'https://www.yahoo.com/server' FROM dual UNION ALL SELECT 'https://www.google.com/test/server' FROM dual)
    SELECT
        regexp_substr(str,'[^/]+',1,2)
    FROM exmpl e;