zoukankan      html  css  js  c++  java
  • 正则表达式的使用

    如判断字符串是否为空

    <%

        Public Function Validation(Pattern,string1)

            Dim RegExp1,Matches

            Set RegExp1=New RegExp

            RegExp1.Pattern=Pattern

            RegExp1.IgnoreCase=True

            RegExp1.Global=True

            Matches=RegExp1.Test(string1)

            Validation=Matches

        End Function

        Public Function CheckIsEmpty(string1)

            CheckIsEmpty=Validation("^$",Trim(string1))        

        End Function

        If CheckIsEmpty("")=True then

            Response.Write(" is Empty"

        Else

            Response.Write(" is not Empty")

        End If

    %>

  • 相关阅读:
    [六省联考2017]相逢是问候
    [CQOI2017]老C的键盘
    [CQOI2017]老C的任务
    [CQOI2017]小Q的棋盘
    <sdoi2017>树点涂色
    三分法
    最长回文子串
    hdu3261
    spoj694
    poj1743
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035751.html
Copyright © 2011-2022 走看看