Table of Contents

Search

  1. Preface
  2. RulePoint
  3. RulePoint Concepts
  4. Using RulePoint
  5. RulePoint Objects
  6. Working with Topics
  7. Working with Connections
  8. Working with Sources
  9. Working with Responders
  10. Working with Responses
  11. Working with Watchlists
  12. Working with Analytics
  13. DRQL
  14. Working with Rules
  15. Working with Alerts
  16. Setting Access Controls
  17. Troubleshooting RulePoint Issues
  18. Connecting to an Ultra Messaging Application
  19. Creating an Ultra Messaging JMS Source

User Guide

User Guide

replace

replace

The replace analytic replaces part of a text string, based on the number of characters you specify, with a different text string.

Syntax

replace(old_text1,[old_text2],,, new_text ,start_num, num_chars)
The following table describes the required and optional arguments:
Argument
Required
Optional
Description
old_text1
Required
Text in which you want to replace some characters.
Old_text2
Optional
Text in which you want to replace some characters.
new_text
Required
The text that will replace characters in old_text.
start_num
Required
The position of the character in old_text that you want to replace with new_text.
num_chars
Required
The number of characters in old_text that you want to replace with new_text.
The following table provides the datatype for the parameters you can pass:
Parameter Input Options
Datatype
Old_text and new_text can also be event properties.
String
Example
when 1 greeting s with replace(s.value1,s.value2,8,5) as result="welcome hello" then response with body="${result}"
The following table describes the result for the event property value that you pass:
Event Property Value
Description
Result
s.value1= "welcome world"
s.value2="welcome hello"
Replaces part of a text string, based on the number of characters you specify, with a different text string.
welcome hello

0 COMMENTS

We’d like to hear from you!