Lipi Reference Lipi

Functions

str.match()

Returns the new substring of the source string if it matches a regex regular expression, an empty string otherwise.

Syntax · 1 of 4

                str.match(const string source, const string pattern) → const string
              

Arguments

source required const string Source string.
pattern required const string The regular expression to which this string is to be matched.

Return Type

const string

Syntax · 2 of 4

                str.match(input string source, input string pattern) → input string
              

Arguments

source required input string Source string.
pattern required input string The regular expression to which this string is to be matched.

Return Type

input string

Syntax · 3 of 4

                str.match(simple string source, simple string pattern) → simple string
              

Arguments

source required simple string Source string.
pattern required simple string The regular expression to which this string is to be matched.

Return Type

simple string

Syntax · 4 of 4

                str.match(series string source, series string pattern) → series string
              

Arguments

source required series string Source string.
pattern required series string The regular expression to which this string is to be matched.

Return Type

series string

Example


          indicator("String to Number Example", overlay=false)
stringNumber = "123.45"
numericValue = str.tonumber(stringNumber)
plot(numericValue, title="Converted Number", color=color.blue)