字符串末尾的正则表达式_# [英] Regular Expressions _# at end of string
本文介绍了字符串末尾的正则表达式_#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 REGEXP_LIKE 函数可在后缀_#(例如_1,_2等)的列中查找值.我可以在下面的查询中在值的任何部分找到_#,但是我只能在末尾仅返回_#的值吗?
I am using the REGEXP_LIKE function in Oracle 10g to find values in a column with a suffix of _#(like _1, _2 etc). I can find _# in any part of the value with the query below but can I return only values with _# at the end ?
SELECT * FROM Table WHERE REGEXP_LIKE (COLUMN,'_[[:digit:]]')
推荐答案
好的.使用...
SELECT * FROM Table WHERE REGEXP_LIKE (COLUMN,'_[[:digit:]]$')
$
字符与字符串的末尾"匹配.
The $
character matches "the end of the string."
这篇关于字符串末尾的正则表达式_#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文