Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨

C#ÕýÔò±í´ïʽ±à³Ì£¨¶þ£©£ºRegexÀàÓ÷¨ 
 
¶ÔÓÚÕýÔò±í´ïʽµÄÓ¦Ó㬻ù±¾ÉÏ¿ÉÒÔ·ÖΪÑéÖ¤¡¢ÌáÈ¡¡¢·Ö¸îºÍÌæ»»¡£½ö½öÀûÓÃRegexÀà¾Í¿ÉÒÔʵÏÖÑéÖ¤ºÍ¼òµ¥Ìæ»»¡£
ÀûÓÃRegexÀàʵÏÖÑéÖ¤
¾­Àú2009ÄêµÄ±¸°¸ºÍDNSÍ£Ö¹½âÎö·ç²¨Ö®ºó£¬´ó²¿·ÖµÄ´øÓз´À¡ÐÔµÄÍøÕ¾ºÍÂÛ̳¶¼¶ÔһЩÃô¸Ð´Ê½øÐÐÁ˹ýÂË£¬°üº¬ÓÐÕâÀàÃô¸Ð´ÊµÄÎÄÕÂҪôÄÚÈݱ»Ì滻Ҫô±»½ûÖ¹·¢±í£¬ÀûÓÃRegexÀà¾Í¿ÉÒÔʵÏÖÕâ¸ö¹¦ÄÜ£¬ÏÂÃæÊÇÒ»¸öÀý×Ó£º
view plaincopy to clipboardprint?
/// <summary>  
/// ¼ì²é×Ö·û´®ÖÐÊÇ·ñÓГËïȨ”Õâ¸öÃô¸Ð´Ê  
/// </summary>  
public void IsMatchDemo()  
{  
    string source = "Áõ±¸ABC¹ØÓðABcÕÅ·ÉAbcÕÔÔÆabcÖî¸ðÁÁaBCËïȨabCÖÜè¤AbC³ËàaBc²Ü²ÙÐíØü¹ù¼ÎÐè»ÎÔ¬ÉÜ";  
    Regex regex = new Regex("ËïȨ");  
    //if (Regex.IsMatch(source, "ËïȨ"))  
    //ÏÂÃæÕâ¾äºÍÉÏÃæ±»×¢Ê͵ôµÄÒ»¾ä×÷ÓõÄͬÑùµÄ  
    if (regex.IsMatch(source))  
    {  
        Console.WriteLine("×Ö·û´®Öаüº¬ÓÐÃô¸Ð´Ê:ËïȨ£¡");  
    } 
/// <summary>
/// ¼ì²é×Ö·û´®ÖÐÊÇ·ñÓГËïȨ”Õâ¸öÃô¸Ð´Ê
/// </summary>
public void IsMatchDemo()
{
    string source = "Áõ±¸ABC¹ØÓðABcÕÅ·ÉAbcÕÔÔÆabcÖî¸ðÁÁaBCËïȨabCÖÜè¤AbC³ËàaBc²Ü²ÙÐíØü¹ù¼ÎÐè»ÎÔ¬ÉÜ";
    Regex regex = new Regex("ËïȨ");
    //if (Regex.IsMatch(source, "ËïȨ"))
    //ÏÂÃæÕâ¾äºÍÉÏÃæ±»×¢Ê͵ôµÄÒ»¾ä×÷ÓõÄͬÑùµÄ
    if (regex.IsMatch(source))
    {
        Console.WriteLine("×Ö·û´®Öаüº¬ÓÐÃô¸Ð´Ê:ËïȨ£¡");
    }
 
Êä³ö½á¹û£º×Ö·û´®Öаüº¬ÓÐÃô¸Ð´Ê:ËïȨ£¡
¶ÔÓÚÉÏÃæµÄÀý×Ó£¬Èç¹ûÒª¼ì²éµÄ×Ö·û´®Öаüº¬“ËïȨ”Õâ¸ö¹Ø¼ü´Ê¾Í»áÔÚ¿ØÖÆ̨ÉÏÊä³öÌáʾ£¬µ±È»ÔÚʵ¼ÊµÄÓ¦ÓÃÖпÉÄÜÊÇ°üº¬Óб»½ûÖ¹µÄ´ÊÓïµÄÄÚÈݲ»ÔÊÐíÌá½»¶ø²»Êǽö½öÌáʾÁË¡£²»¹ýÕâÀàÇé¿öÈ


Ïà¹ØÎĵµ£º

C#µ¥ÊµÀýÔËÐеÄʵÏÖ

Ö÷Ҫͨ¹ýÐÞ¸Äprogram.csÎļþµÄÄÚÈÝÀ´ÊµÏÖ¡£
Ê×ÏÈÔÚÌí¼Ó¼¸¸öÃû¿Õ¼äµÄÒýÓãº
using System.Diagnostics;                          //ʹÓÃProcess
using System.Runtime.InteropServices; ......

C#»ù´¡ÎÊÌâ

Èç¹ûÄãµÄ¼òÀúÉÏÃæд“ÊìϤ/Á˽âC#”£¬ÄÇôÄã¾ÍÓ¦¸ÃÄܹ»»Ø´ðÏÂÃæµÄÕâЩ»ù´¡ÎÊÌâ¡£
´«Èëij¸öÊôÐÔµÄset·½·¨µÄÒþº¬²ÎÊýµÄÃû³ÆÊÇʲô£¿
value£¬ËüµÄÀàÐͺÍÊôÐÔËùÉùÃûµÄÀàÐÍÏàͬ¡£
ÈçºÎÔÚC#ÖÐʵÏּ̳У¿
ÔÚÀàÃûºó¼ÓÉÏÒ»¸öðºÅ£¬ÔÙ¼ÓÉÏ»ùÀàµÄÃû³Æ¡£
C#Ö§³Ö¶àÖؼ̳Ðô£¿
²»Ö§³Ö¡£¿ÉÒÔÓýӿÚÀ´ÊµÏÖ¡£
±»protecte ......

ÔÚc#ÖеÄÈ¡µÃsql server´æ´¢¹ý³ÌµÄoutput²ÎÊý

private void Create_Pz(string Sourcename)
        {
            string OutMsg;
            SqlParameter[] sortPara = { new SqlParameter("@ps_IsType", Pz ......

΢ÐÍORM——ÓÃVBºÍC#±àдµÄ¶¯Ì¬ÀàÐÍORM

      ½üÀ´ORM±äµÃÔ½À´Ô½Æձ飬Õⶼ¹éÓÚÒ»Öֺܾß˵·þÁ¦µÄÔ­Òò£»Ëü¿ÉÒÔʹ¿ª·¢Êý¾Ý¿âÇý¶¯µÄÓ¦ÓóÌÐò±äµÃ¸ü¿ì¡¢¸üÊ¡Á¦¡£µ«ÊÇORM¿ò¼Ü¶¼Óе㓹ÌÖ´¼º¼û”£¬ËûÃÇÆÚÍû¿ª·¢Õß×ñ´ÓÌض¨µÄ¹æÔò£¬µ±¹æÔò±»´òÆƵÄʱºò¾Í·Ç³£ÄÑÒÔʹÓá£×îͨ³£µÄ¹æÔòÖ®Ò»¾ÍÊÇ£¬´æ´¢¹ý³Ì±ØÐë×ÜÊÇ·µ»Øµ¥¶ÀµÄ½á¹û¼¯£¬ÆäÖд ......

²âÊÔÓï·¨¸ßÁÁµÄ C# ´úÂëµÄ html fragment Éú³É

²âÊÔÓï·¨¸ßÁÁµÄ C# ´úÂëµÄ html fragment Éú³É:
ÓÃcsdn blog API ·¢²¼.
ÏÂÃæÊÇ:
public class HtmlWriter
{
   static Dictionary _colors;
   static int _colorNum;
   static StringBuilder _colorString;

© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ