Hi everyone,
I have been tasked to parse out a variable from c++ source files. If you can imagine, developers have different ways of doing things. However, there is a pattern that I could work with but I can't seem to find the right regular expression.
The text that I parsed out so far looks similar to this
snippet 1
or it could be this
snippet 2
or it could be this
snippet 3
I am trying to extract keyVar, keyVariable, myKeyVariable. That particular variable could be named any number of ways. How would I extract it? If I used the ...\\w+\p{Punct}, snippet 2 would be correct but not snippet 3.
Any help is appreciated.
Thanks.
Vince