How to get all matches from a string using regex?
I have a string:
".+(.cpp$|.cxx$|.d$|.h$|.hpp$)"
and I would like to get only the cpp cxx d h and hpp parts.
EDIT:
So basically I would like to construct regex which would match any string of characters starting with dot and ending with $.
I’ve tried the pattern: "\\.[^$+]+" which is supposed to match dot and everything else except $ and plus one or more times but this gets just the first .cpp part and I need all of them
Since you mention Qt in your question, here is how you would do it using
QRegExp: