简体   繁体   中英

REGEXP_LIKE: Character positioning?

I have the following field:

msg
----
2015-07-22-06.53.32
CIPIRDSR:XQ040 CHANGE
2015-07-22-06.53.42
1
reg

I am trying to extract the datetime only. I was using

WHERE NOT REGEXP_LIKE (msg, '^[[:digit:]]+$')

however, that doesn't quite do it what I want it to. It still returns more than the datetime. Can you help?

Thanks!

如果要提取日期时间,请使用要查找的日期时间格式:

where regexp_like(msg, '^[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}[.][0-9]{2}[.][0-9]{2}$')

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