Skip to content

Instantly share code, notes, and snippets.

@mujahidk
Created September 12, 2018 21:45
Show Gist options
  • Save mujahidk/f79bc0d960fe886ae84d991bb4435a28 to your computer and use it in GitHub Desktop.
Save mujahidk/f79bc0d960fe886ae84d991bb4435a28 to your computer and use it in GitHub Desktop.
Oracle REGEXP_SUBSTR with sub expression
SELECT REGEXP_SUBSTR('http://www.example.au.com/services', 'https?://(www.)?(\w+).', 1, 1, 'i', 2/*Second sub expression result*/) AS DOMAIN_PART
FROM DUAL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment