whats wrong with this regular expression c#?
- by Greezer
I runned into a problem with my regular expressions, I'm using regular expressions for obtaining data from the string below:
"# DO NOT EDIT THIS MAIL BY HAND #\r\n\r\n[Feedback]:hallo\r\n\r\n# DO NOT EDIT THIS MAIL BY HAND #\r\n\r\n"
So far is got it working with:
String sFeedback = Regex.Match(Message, @"\[Feedback\]\:(?<string>.*?)\r\n\r\t\n# DO NOT EDIT THIS MAIL BY HAND #").Groups[1].Value;
This works except if the header is changed, therefore I want the regex to read from [feedback]: to the end of the string. (symbols, ascii, everything..)
I tried: \[Feedback]:(?<string>.*?)$
Above regular expression does work in some regular expression builders online but in my c# code its not working and returns a empty string.
can someone help me with this regular expression? thanks in advance