• 正则表达式的使用


    如判断字符串是否为空

    <%

        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

    %>

  • 相关阅读:
    bom案例2-弹出层
    bom案例1-div拖拽
    bom-scroll
    bom-client
    bom-offset
    9. 阻塞队列
    8. 读写锁
    7. CountDownLatch、CyclicBarrier、Semaphore
    6. Callable
    5. 集合不安全
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035751.html
Copyright © 2020-2023  润新知