I need a regex for finding all .h, .c, and .cpp files in a folder. Help?
[no, this isn't homework, I just don't have time to learn regexes right now]
I need a regex for finding all .h, .c, and .cpp files in a folder. Help?
[no, this isn't homework, I just don't have time to learn regexes right now]
Try this:
/\.h$|\.c$|\.cpp$/
You can also write it like this:
/\.(h|c|cpp)$/
Try:
\.(h|c(pp)?)$
But do you really need a regex? Where are you using this?