public Regex MyRegex = new Regex( "\\[(?<filename>[^\\]]*)\\]", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled ); // This is the replacement string public string MyRegexReplace = "<img src='/images/face/${filename}'>"; //// Replace the matched text in the InputText using the replacement pattern // string result = MyRegex.Replace(InputText,MyRegexReplace);
"\\[(?<filename>[^\\]]*)\\]",
RegexOptions.IgnoreCase
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
// This is the replacement string
public string MyRegexReplace =
"<img src='/images/face/${filename}'>";
//// Replace the matched text in the InputText using the replacement pattern
// string result = MyRegex.Replace(InputText,MyRegexReplace);