Clarity Service Management

CA SDM::.SPEL::. Gsub 

01-25-2017 07:17 AM

Gsub

Overview

A spell function returning the string with every occurence of a given pattern replaced by another string.

Usage

<source lang="javascript"> string gsub(strSource, strRegEx, strReplacement); </source>

  • strSource - source string to be replaced
  • strRegEx - regular expression pattern
  • strReplacement - by which string should be pattern replaced

Results

Returns changed string or the same string if pattern does not match.

Examples

  • Convert several lines to a one comma separated string

<source lang="javascript">

gsub(errorStr,"\n", ", ")

</source>

 

 

Gsub - SDU 

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.