sampath meka

sampath meka

  • NA
  • 94
  • 31.1k

Regular Expression for Exact Extension for a Filename

Dec 10 2014 1:03 AM
Hello All,
 
                   My question is i have following file names where it process based on the extension type using regular expression only.
 
 
  myname.c 
 myname.csi
 myname.ctr
 myname.hsi
 myname.h 
 myname.htr 
 
                          For the above strings if we apply regular expression the output should be
 
myname.c 
myname.h 
 
I want only file name with extension .c and .h only
 
 
Thanks & Regards,
Sampath 
 
 
 
 

Answers (5)