regular sample

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace NLS
{
    
class RegularExpressionReader
    
{
        
public static List<string> FindMatches(string findPattern, string replacePattern, string input)
        
{
            List
<string> list = new List<string>();
            Regex regex 
= new Regex(findPattern);
            MatchCollection mc 
= regex.Matches(input);
            
foreach (Match m in mc)
            
{
                
string ri = m.Value;
                
string text = Regex.Replace(ri, findPattern, replacePattern);
                list.Add(text);
            }

            
return list;
        }


        
public static List<string> FindMatches(string findPattern, string input)
        
{
            List
<string> list = new List<string>();
            Regex regex 
= new Regex(findPattern);
            MatchCollection mc 
= regex.Matches(input);
            
foreach (Match m in mc)
            
{
                
string ri = m.Value;
                list.Add(ri);
            }

            
return list;
        }

    }

}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Entities;

namespace NLS
{
    
class Worker
    
{
        
"ReadXML"

        
"Parse"

        
"GetBroker"

        
"GetListingAgent"

        
"GetAgentMedia"

        
"GetAgentContactInfo"

        
"GetTelephones"

        
"GetProfileUrl"

        
"GetWebSite"

        
"GetAgentName"

        
"GetAgentID"

        
"GetMedia"

        
"GetUrls"

        
"GetDetails"

        
"GetHighlights"

        
"GetFeatures"

        
"GetGarage"

        
"GetDetailBasementType"

        
"GetBathrooms"

        
"GetBedrooms"

        
"GetYearBuilt"

        
"GetDevelopmentLevel"

        
"GetLot"

        
"GetLotComment"

        
"GetDimensions"

        
"GetHeight"

        
"GetWidth"

        
"GetLength"

        
"GetLotLegal"

        
"GetLivingArea"

        
"GetDetailStyle"

        
"GetHasSuite"

        
"GetPropertyType"

        
"GetAssociationFee"

        
"GetTaxAmount"

        
"GetAvailableDate"

        
"GetRentalPrice"

posted @ 2008-05-26 22:51  N/A2011  阅读(171)  评论(0编辑  收藏  举报