51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2272|回复: 1
打印 上一主题 下一主题

[原创] 请教一个关于使用qc自带的一个OTA API函数的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-7-6 22:45:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
最近用到了qc自带的OTA API中的一个方法Find,用于查找某目录下的需求
原型如下:
Public Function Find( _
   ByVal StartRootID As Long, _
   ByVal FieldName As String, _
   ByVal Pattern As String, _
   Optional ByVal Mode As Long = 0, _
   Optional ByVal Limit As Long = 100 _
) As List

其中有个参说的说明
StartRootID :The ID of the root of the subtree from which to start the search.
FieldName :The name of the field to scan for the value.
Pattern :The search pattern. Regular expression are permitted in SQL format only.
Mode :A search option. Use values from the tagTDAPI_REQMODE Enumeration.
Limit :The maximum number of matches to report.

其中Pattern :The search pattern. Regular expression are permitted in SQL format only.
翻译过来应该是该参数可以用正则表达式,可是不知道应该以怎样格式写进去,比如我要查找某个需求名称为 “支付交易”,要怎样将他完全匹配的正则表达式子作为参数放进去呢?
它完全匹配的正则表达式不应该是“^支付交易$”么?可是我传进去就找不到了。。,请高手指点。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2009-9-1 15:22:41 | 只看该作者
如果不用通配符,会find成功么?
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-10-6 22:19 , Processed in 0.077755 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表