快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

REGULAR EXPRESSION IN VBSCRIPT

REGULAR EXPRESSION IN VBSCRIPT
Object RegExp is used to create and execute regular expression

Ex.
Code:
strTarget="test testing tested attest late start"
Set objRegExp= New RegExp \\\'create a regular expression

objRegExp.Pattern="test*" \\\'set the search pattern
objRegExp.IgnoreCase=False \\\'set the case sensitivity
objRegExp.Global=True \\\'set the scope

set colMatches=objRegExp.Execute(strTarget) \\\'execute the search

For Each Match in colMathes \\\'iterate the colMatches collection
Response.Write "Match found at position" & Match.FirstIndex & "."
Response.Write "Matched value is \\\'" & Match.Value & "\\\',<BR>"
Next

Tested Result:
Match found at position 0. Matched value is \\\'test\\\'.
Match found at position 5. Matched value is \\\'test\\\'.
Match found at position 13. Matched value is \\\'test\\\'.
Match found at position 22. Matched value is \\\'test\\\'.
返回类别: 教程
上一教程: ASP中关于帖子分页显示的基本方式
下一教程: 关于释放SESSION的两篇文章(二)

您可以阅读与"REGULAR EXPRESSION IN VBSCRIPT"相关的教程:
· 正则表达式REGULAR EXPRESSION详述
· 用VBSCRIPT实现对WINDOWS注册表的修改
· 正则表达式(REGULAR EXPRESSION)
· 仿照CHINAASP论坛中TOP10写的部分显示代码
· 如何在服务器端调用WINZIP命令行对上传的多个文件打包压缩
    微笑服务 优质保证 索取样品