正则表达式:匹配以“ Id”结尾的单词 [英] regex: match word that ends with "Id"
本文介绍了正则表达式:匹配以“ Id”结尾的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要帮助来整理一个正则表达式,以匹配以 Id结尾的单词并区分大小写。
I need help putting together a regex that will match word that ends with "Id" with case sensitive match.
推荐答案
尝试以下正则表达式:
\w*Id\b
\w *
允许在 Id $ c前面的单词字符$ c>和
\b
确保 Id
在单词的末尾( \b
是单词边界声明)。
\w*
allows word characters in front of Id
and the \b
ensures that Id
is at the end of the word (\b
is word boundary assertion).
这篇关于正则表达式:匹配以“ Id”结尾的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文