fork(11) download
  1. using System.Text.RegularExpressions;
  2.  
  3. class RegExSample
  4. {
  5. static void Main()
  6. {
  7. string s = "Why Don't You watch <NAME>This is Spinal Tap</NAME> on <DAY>Friday</DAY> or whenever?";
  8. s = Regex.Replace(s, @"((?<!^)\b[A-Z])(?=[^<>]+<[^\/>][^>]+>)", m => m.Value.ToLower());
  9. System.Console.WriteLine(s);
  10. }
  11. }
Success #stdin #stdout 0.08s 37168KB
stdin
Standard input is empty
stdout
Why don't you watch <NAME>This is Spinal Tap</NAME> on <DAY>Friday</DAY> or whenever?