Striim 3.10.1 documentation

String functions

function

description

notes

ARLEN(String)

returns the number of fields in the specified array

see Handling variable-length events with CQs for an example

IP_CITY(String)

get the city for an IP address

uses MaxMind GeoIP

IP_COUNTRY(String)

get the country for an IP address

uses MaxMind GeoIP

IP_LAT(String)

get the latitude for an IP address

uses MaxMind GeoIP

IP_LON(String)

get the longitude for an IP address

uses MaxMind GeoIP

match(String s, String regex)

match(String s, String regex, Integer groupNumber)

match the string using the specified regex expression. You can optionally specify the capture group number (the default is 0).

supports only single return value )see Using regular expressions (regex))

maxOccurs(String)

value that had the maximum occurrences in the String

see MultiLogApp for examples

replaceString(Event s, String findString, String newString)

for input stream s, replaces all occurrences of findString (in all fields) with newString

For example, SELECT replaceString(s,'MyCompany','PartnerCompany') replace all occurrences of MyCompany with PartnerCompany.

Use only with events of user-defined types.

replaceStringRegex(Event s, String regex, String newString)

for input stream s, replaces all strings (in all fields) that match the specified regex expression with newString

For example, SELECT replaceStringRegex(s,’\\s’,’’) would remove all whitespace, and SELECT replaceStringRegex(s,’\\d’,’x’) would replace all numerals with x.

Use only with events of user-defined types.

SLEFT(Object, Integer)

returns only the characters to the left of position Integer from the object

SRIGHT(Object, Integer)

returns only the characters to the right of position Integer from the object

for example, SRIGHT(orderAmount,1) would remove a dollar, Euro, or other currency sign from the beginning of a string

TO_BOOLEAN(Object)

convert a string to a Boolean

TO_STRING(Object)

convert any object to a string