Does anyone know how to retrieve a short sentence from within the main string? Is it required to use regular expressions?
I am trying to retrieve the text “Thu Dec 9 05:12:42 2010” which is the time from the main string “LastWrite Time Thu Dec 9 05:12:42 2010 (UTC)” which is after “Time” and before “(UTC)”.
I am also new to C# so sorry for the simple question.
May someones please advise or show some C# methods that may be used to retrieved the text? Thanks!
You can use a regular expression:
You can then get the substring you want from
match.Groups[1].Value.