简体   繁体   中英

Oracle matching file extensions

How can can I match String like this in Oracle:

73c49987f5378438a0d720e06e88338e/009-1216543_14_file1.xls 

74135a8a8b4831888859ab3e7fe1c728/009_0108571_15_file2.pdf

750182f2c19767b30149c511d334b097/file3.pdf

I came up with this:

Regexp_Like (mytext, '\.[a-zA-Z0-9]+$','i')

But this catches only the strings like for example

'.xls' 

but not

'73c49987f5378438a0d720e06e88338e/009-1216543_14_file1.xls'

Try this one,

\w+\/(\d+-?_?)*\w+\.\w+{3}

Working Demo

Try this out:

^.*\/.*\.[a-zA-Z]{3}$

Demo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM