How do i read the following text into a single string using c# regex?
*EDIT * :70://this is a string //this is continuation of string even more text 13
this is stored in a c# List object
so for example, the above needs to return
this is a string this is continuation of string even more tex
I've thought something like this would do the job, but it doesn't return any group values
foreach (string in inputstring)
{
string[] words
words = str.Split(default(string[]), StringSplitOptions.RemoveEmptyEntries);
foreach (string word in words)
{
stringbuilder.Append(word + " ");
}
}
Match strMatch = Regex.Match(stringBuilder, @"[^\W\d]+");
if(strMatch.Success)
{
string key = strMatch.Groups[1].Value;
}
perhaps, i'm going about this all wrong, but i need to use the regex expression to formualte a single string from the example string.
foreach. Also, you're not using said variable anywhere