user2008558
user2008558

Reputation: 341

extract names from a delimiter in SQL

I have a string

 '/path/to/file/123'

I want to extract the following in sql

'file'

Upvotes: 0

Views: 50

Answers (1)

Massi FD
Massi FD

Reputation: 398

You can try this:

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

Thank you

Upvotes: 1

Related Questions