正则表达式

 正则表达式

strres = Globals.RenderControl(targetControl);

                //string strTest = strres.ToString().Replace("1\r\n                                                             楼", "LOVE");
                //Regex regex = new Regex("1[1\\S|\\s]*楼");
                //Regex regex = new Regex("{n}[\\S|\\s]*楼");
                //string strTest = regex.Replace(strres, "☉");
  
                //for (int i = 0; i < PageSize; i++)
                //{
                //    Regex regex = new Regex(i.ToString()+"[\\S|\\s]*楼");

                //    strTest = regex.Replace(strres, ((pageIndex-1)*30+i).ToString());

                //}

                for (int i = 1; i <= PageSize; i++)
                {
                    int postLou=(pageIndex-1)*30 + i;
                    strres = strres.Replace("   "+i.ToString() + "\r\n                                                             楼", postLou.ToString() + " 楼");
                }

 

你可能感兴趣的:(正则表达式)