I have this regex to read all lines after the value Description:
var descriptionMatches =
Regex.Matches(source, @"\b(?<key>Description)\s*(?<value>\w+)");
The problem is, the returned value is only the first word, not the whole line.
What I’m missing,
Change
\w+to be.+. This will match all characters instead of just a series word characters (which does not include whitespace).Also, if you want
.to match newlines (you indicate that you want to match all lines after the description), then you must use theRegexOptions.Singlelineoption: