Im working on a response filter. Im trying to catch all expresion: $sometext.sometext$ with the following regular expression: ^\w+?.\w+?\$
In my implementation it looks like:
public override void Write(byte[] buffer, int offset, int count)
{
// Convert the content in buffer to a string
string contentInBuffer = UTF8Encoding.UTF8.GetString(buffer);
string regex=@"^\\w+?\.\w+?\$";
RegexOptions options = RegexOptions.Multiline;
MatchCollection matches = Regex.Matches(contentInBuffer , regex, options);
foreach (Match match in matches)
{
string value = match.Value;
}
outputStream.Write(UTF8Encoding.UTF8.GetBytes(contentInBuffer), offset, UTF8Encoding.UTF8.GetByteCount(contentInBuffer));
}
The issue is when I write $Catch.Me$ on a aspx page It wont get caught by my regular expression in the write method. What Im I missing?