Brekeke SIP Server Wiki

$str.substring

Extract a part of the string
Syntax:
$str.substring( string, beginIndex )
$str.substring( string, beginIndex, endIndex )
Parameters:

beginIndex – where to start the extraction
endIndex – where to end the extraction

 

Returns:

the specified string.

 

Version Since:

1.0

 

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

 

Example:
$str.substring( “sip:user@domain”, 4 )= (.+)

Get “user@domain”

$str.substring( “sip:user@domain”, 4, 8 )= (.+)

Get “user”

Yes No
Suggest Edit