sampath meka

sampath meka

  • NA
  • 94
  • 31k

Regex for filename

Dec 10 2014 11:34 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 (3)