I have the following code in a text file:
static const char* g_FffectNames[EFFECT_COUNT] = {
"Fade In and Fade Out",
"Halloween Eyes",
"Rainbow Cycles"
};
I can use g_FffectNames[EFFECT_COUNT]
as a starting point to search in this big text file. But I need to get the things within quotes (e.g Halloween Eyes or Rainbow Cycles).
What is the best way to get those text in C#? I would also have to assume that there are more code on top of this file (before the static const
) and also toward the bottom (after the };
) and that spacing between characters such as = {
or };
is optional to the user.
Should I compress all of these lines into one string and start the search or should I use some sort of regex matching to make this easier?