@ReplaceFirst

@REPLACEFIRST 用替换字符串替换第一个出现的正则表达式。

DTP 类型:

可以为字符串密码一个成员多个成员一个维多个维类型的 DTP 分配 @REPLACEFIRST

语法:

@REPLACEFIRST(String,Regular Expression,replaceString)

参数:

参数 说明
String 设计时提示或文本
Regular Expression 设计时提示或文本
replaceString 设计时提示或文本

示例:

[ReplaceFirst_Str]=@REPLACEFIRST([String1],[Rep_String],[new_String])

其中:

  • [ReplaceFirst_Str]字符串类型的 DTP,不是检查的提示。

  • [String1]字符串类型的 DTP,是检查的提示。

  • [Rep_String]字符串类型的 DTP,是检查的提示。

  • [new_String]字符串类型的 DTP,是检查的提示。

假设该参数如下所示:

  • String:"This is a testing of the new test of a test today"

  • Regular Expression:"Test"

  • Replace String:"XYZ"

在此示例中,[ReplaceFirst_Str] 返回:"This is a XYZing of the new test of a test today"。它将仅替换第一个出现的 test,不替换出现的所有 test。