fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Program
  5. {
  6. public static void Main(string[]args)
  7. {
  8. string s="t101c5p2";
  9. string[]arr= Regex.Split(s,"(?<=[0-9])(?=[a-zA-Z])");
  10. foreach(String str in arr)
  11. {
  12. // str= str.replaceAll("([a-z])([0-9])","$1=$2");
  13. string replaceStr = new Regex("([a-z])([0-9])").Replace(str,"$1=$2");
  14. Console.WriteLine(replaceStr);
  15. }
  16. }
  17. }
Success #stdin #stdout 0.07s 34120KB
stdin
Standard input is empty
stdout
t=101
c=5
p=2