仅在行开始时进行REGEX检查 [英] REGEX check only when start of line
本文介绍了仅在行开始时进行REGEX检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设仅当在行首出现特定单词,例如"test"时,才希望保留字符串的整行.
Suppose we want to keep the entire line of a string only if a particular word say e.g 'test' appears at starting of line.
如果它出现在任何地方,则应删除整行
If it appears anywhere then the entire line should be removed
例如
if function_test()=5; //here this entire line should be removed
test sample =5; //here this entire should be there
推荐答案
尝试...
...
WHEN REGEXP_LIKE(string,'^test','i') THEN
//this is a good line, do what you want or return string;
END
...
这篇关于仅在行开始时进行REGEX检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文