Frog Frogs recommended: A case of C # positive expression application
I solved the problem with C # last time, put it on the first
First, save all the code in this article as Arr_reg.cs
The following code is compiled into a console program with CSC to see the results, and the compilation commands are as follows:
Csc/t:exe Arr_reg.cs
Using System;
Using System.Text.RegularExpressions;
public class regextest{
public static void Wawa_reg () {
String[] Arr=new string[15]; Defines a string array
arr[0]= "1, website member management"; Populating arrays
Arr[1]= "2, Administrator Rights Management";
Arr[2]= "3, supply and demand information management";
Arr[3]= "4, Product display Management";
Arr[4]= "5, the window of the enterprise management";
arr[5]= "6, credit Management";
arr[6]= "7, expert library Management";
Arr[7]= "8, Electronic journal Management";
Arr[8]= "9, software download Management";
Arr[9]= "10, Industry classification management";
arr[10]= "11, website system Management";
arr[11]= "12, characteristic industry management";
arr[12]= "13, Talent recruitment management";
Arr[13]= "14, advertising management";
arr[14]= "15, project Management";
for (int i=0;i<15;i++) {//traversal array, output the left and right parts of each element
string S1 = Regex.Replace (Arr[i], @ "^ (d*), (. *) d*$", "$");
String s2 = Regex.Replace (Arr[i], @ "^ (d*), (. *) d*$", "$");
Console.WriteLine ("arr[" +i+ "].s1=" +s1+ "arr[" +i+ "].s2=" +s2);
}
}
public static void Main ()
{
Wawa_reg ();
}
}
Unfortunately, I use a VBS or can not solve ah, alas, slowly study it, this week basically tinker with regular expression, originally also want to learn some SQL Server in the view, indexing and stored procedures, do not know the time is enough
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.