qfeng 发表于 2009-7-6 22:45:20

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

最近用到了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.
翻译过来应该是该参数可以用正则表达式,可是不知道应该以怎样格式写进去,比如我要查找某个需求名称为 “支付交易”,要怎样将他完全匹配的正则表达式子作为参数放进去呢?
它完全匹配的正则表达式不应该是“^支付交易$”么?可是我传进去就找不到了。。,请高手指点。

sincky 发表于 2009-9-1 15:22:41

如果不用通配符,会find成功么?
页: [1]
查看完整版本: 请教一个关于使用qc自带的一个OTA API函数的问题