Regex: match word that ends with “Id”

Try this regular expression:

\w*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).

Leave a Comment