using System;
using System.Text.RegularExpressions;
namespace bobomousecom.crm
{
/// <summary>
/// Regexlib 的摘要说明。
/// </summary>
public class Regexlib
{
public Regexlib()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//搜索输入字符串并返回所有 href=“...”值
string DumpHrefs(String inputString)
{
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]);
}
}
//验证Email地址
bool IsValidEmail(string strIn)
{
// Return true if strIn is in valid e-mail format.
return Regex.IsMatch(strIn, @"^([/w-/.]+)