I tried several options, but nothing gives me a whole word.
it gives me partial words,
`@"(?<![.])\w+"`
I am parsing C # code, so the string "Regex.Match(" ", " ")"should return Regex, but not match.
As a result, I used only \w+and performed this check,
if ((match.Index > 0) && ('.' == text[match.Index - 1]))
continue;
Which works fine, but it was just curious if there was a regex that would also do this.
source
share