Brekeke SIP Server Wiki

$str.replace

Replace the specified substring

 

Syntax:
$str.replace( string, old, new )
Parameters:

string – the original string
old – the value to find
new – the value to replace

 

Returns:

the new string.

 

Version Since:

3.5

 

Where the function can be used:
  • Preliminary rules
  • Regular rules

 

Example:
$str.replace( "sip:123456@domain","123", "999" )= (.+)

The returned value will be sip:999456@domain

$str.replace( "123*456*789","*","-")= (.+)

Replace ‘*’ with ‘-‘. The returned value will be 123-456-789

Yes No
Suggest Edit