Regular Expression only match if String ends with target

Use an end anchor ($):

.*\.ccf$

This will match any string that ends with .ccf, or in multi-line mode, any line that ends with .ccf.

Leave a Comment