Home > Blockchain >  extract names from a delimiter in SQL
extract names from a delimiter in SQL

Time:07-08

I have a string

 '/path/to/file/123'

I want to extract the following in sql

'file'

CodePudding user response:

You can try this:

SELECT regexp_substr('/path/to/file/123', '[^/] ', 1, 3)
  FROM dual;

Thank you

  • Related