Frog Frog Recommended: C # Regular expression application

zhaozj2021-02-16  59

// Frog Frog Recommendation: C # Regular Expression Apply an example // I last last time I used C # to solve it, post it first // First copy all code copy this article to arr_reg.cs // then put the following code After compiling into a console program with CSC, you can see the result, the compile command is as follows: // CSC / T: Exe arr_reg.csusing system; use system.text.regularexpressions; public class regextest {public static void wawa_reg () {String [] arr = new string [15]; // Define a string array arr [0] = "1, website member management"; // Fill arrays arr [1] = "2, administrator privilege management"; Arr [ 2] = "3, supply and demand information management"; Arr [3] = "4, product display management"; Arr [4] = "5, the window management of the company"; Arr [5] = "6, credit enterprise management" Arr [6] = "7, expert library management"; Arr [7] = "8, electronic magazine"; Arr [8] = "9, software download management"; Arr [9] = "10, industry classification Management "; Arr [10] =" 11, website system management "; Arr [11] =" 12, special 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 ) {// Traverse array, output each element left and right part String S1 = regex.replace (Arr [i], @ "^ (/ d *), (. *) / d * $", "$ 1"); string s2 = regex.replace (Arr [i], @ "^ (/ d *) (. *) / d * $ "," $ 2 "); console.writeline (" / Narr [" "]. S1 = " S1 " / NARR [" i "]. S2 = " S2 );}} Public static void main ()}}} / The view, index, and stored procedures in SQL Server, don't know if the time is enough.

转载请注明原文地址:https://www.9cbs.com/read-16568.html

New Post(0)