Small write digital conversion to the most complete C # scheme for Chinese capital

xiaoxiao2021-03-06  141

Using system.text.regularexpressions;

Namespace BobomouseCom.crm {///

/// regexlib's summary description. /// public class regexlib {public regexlib () {// // Todo: Add constructor logic here //}

/ / Search input string and return all href = "..." value string dumphrefs (string infutstring) {regex r; match m;

R = New Regex ("HREF // S * = // s * (?: /" ("<1> [^ /"] *) / "| (? <1> // s ))", regexoptions. Ignorecase | regexoptions.compiled; for (m = r.match (inputstring); m.success; m = m.nextMatch ()) {return ("Found Href" m.Groups [1]);}}

// Verify the Email Address Bool IsValidemail (String Strin) {// Return True if Strin IS in Valid E-mail Format. Return Regex.ismatch (Strin, @ "^ ([/ w - /.] ) @ (/ [[0-9] {1,3} /. [0-9] {1,3} /. [0-9] {1,3} /.) | ([/ W -] /.) )) ([A-ZA-Z] {2, 4} | [0-9] {1, 3}) (/]?) $ ");

// DD-MM-YY date is in place of the date form of MM / DD / YY. String mDytodmy (String Input) {RETURN Regex.replace (Input, "// b (? // D {1, 2}) / (? // D {2, 4}) // b "" $ {day} - $ {month} - $ {year} ");

// Verify that whether it is a decimal bool isvaliddle (string strin) {return regex.ismatch (strin, @ "[0] ./ D {1, 2} | [1]");

// Verify that whether it is a phone number BOOL IsValidtel (String Strin) {return regex.ismatch (strin, @ "(/ d -? / D {7} | / d {3} -? / d {8} | ^ / d {7, 8}) (- / d )? ");

// Verify the year of the month BOOL Isvaliddate (String Strin) {Return Regex.ismatch (STRIN, @ "^ 2 / d {3} - (?: 0? [1-9] | 1 [0-2]) - ( ?: 0? [1-9] | [1-2] / d | 3 [0-1]) (?: 0? [1-9] | 1 / d | 2 [0-3]) :(? : 0? [1-9] | [1-5] / d) :( ?: 0? [1-9] | [1-5] / d) $ ");

// Verify the suffix name BOOL IsvalidPostfix (String Strin) {return regex.ismatch (strin, @ "/. (? I: gif | jpg) $");}

// Verify whether the character is BOOL IsValidByte (String Strin) {Return Regex.ismatch (Strin, @ "^ [AZ] {4, 12} $");} // Verify ISVALIP (String Strin ) {RETURN Regex.ismatch (Strin, @ "^ (/ d {1, 2} | 1 / d / d | 2 [0-4] / d | 25 [0-5]) /. (/ D {1 , 2} | 1 / d / d | 2 [0-4] / d | 25 [0-5]) /. (/ D {1, 2} | 1 / d / d | 2 [0-4] / D | 25 [0-5]) /. (/ d {1, 2} | 1 / d / d | 2 [0-4] / d | 25 [0-5]) $ ");}}}

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

New Post(0)