List of parsing functions
Discover the full list of functions supported by Custom Parser: regex, XPath, CSS, and more.
You can find usage examples of each function in the Parsing function examples page.
HTML processing
element_text
Name:
element_textDescription: Extracts text from
html. Strips leading and trailing whitespaces.Args: n/a
Valid input types:
htmlExpected output types:
str
xpath
Name:
xpathDescription: Executes an XPath expression on the given input value. If the execution fails to produce a result, the following expression in the array is used. XSLT functions can be used in expressions. XPath version 1.0 is supported. XSLT version 1.0 is supported.
Args:
xpath_expressionsType:
[str]Required:
true
Valid input types:
html
Expected output types:
[str][html]strfloatbool
xpath_one
Name:
xpath_oneDescription: Works the same way as
xpath, but returns only the first value even if more than one value is selected by the provided XPath.Args:
xpath_expressionsType:
[str]Required:
true
Valid input types:
html
Expected output types:
strhtmlstrfloatbool
css
Name:
cssDescription: Executes an CSS expression on the given input value. If the execution fails to produce a result, the following expression in the array is used. Please note that the output of the
cssfunction always is a JSON array containing HTML elements (including the opening and closing tags). If you're interested in extracting the content of the element, you may execute theelement_textfunction afterwards.Args:
css_expressionsType:
[str]Required:
true
Valid input types:
html
Expected output types:
[html_element]
css_one
Name:
css_oneDescription: Works the same way as
css, but returns only the first value even if more than one value is selected by the provided CSS expression. Please note that the output of thecss_onefunction always is an HTML element (including the opening and closing tags). If you're interested in extracting the content of the element, you may execute theelement_textfunction afterwards.Args:
css_expressionsType:
[str]Required:
true
Valid input types:
html
Expected output types:
html_element
String manipulation
amount_from_string
Name:
amount_from_stringDescription: Find the first occurrence of a numeric value in a string and convert it to a float.
Args: n/a
Valid input types:
str
Expected output types:
float
amount_range_from_string
Name:
amount_range_from_stringDescription: Finds all occurrences of numeric values in a string and converts them to floats.
Args: n/a
Valid input types:
str
Expected output types:
[float]
join
Name:
joinDescription: Joins a list of strings into a single string. Joined values are separated by the
separatorvalue.Args:
separatorType:
strRequired:
falseDefault:
""
Valid input types:
[str]
Expected output types:
str
regex_find_all
Name:
regex_find_allDescription: Finds all strings that match a given RegEx expression.
Args:
regex_patternType:
strRequired:
true
Valid input types:
str
Expected output types:
[str]
regex_search
Name:
regex_searchDescription: Finds a string that matches the given RegEx expression. Returns the specified matching group (defaults to
0).Args:
regex_patternType:
strRequired:
true
group_to_returnType:
intRequired:
falseDefault:
0
Valid input types:
str
Expected output types:
str
regex_substring
Name:
regex_substringDescription: Finds a string that matches the given RegEx expression. Returns the specified matching group (defaults to
0).Args:
regex_patternType:
strRequired:
true
group_to_returnType:
intRequired:
falseDefault:
0
Valid input types:
str
Expected output types:
str
Common
length
Name:
lengthDescription: Gets the length of the array. If a multi-dimensional array is provided as input, the function will work on the innermost array.
Args: n/a
Valid input types:
[OneDimensionalArray]
Expected output types:
int
select_nth
Name:
select_nthDescription: Returns the nth array element. Zero-based indexing is used. Supports negative indexes to select last (
-1), second last (-2), … item from an array.Args:
indexType:
intRequired:
true
Valid input types:
[AnyType]
Expected output types:
AnyType
convert_to_float
Name:
convert_to_floatDescription: Converts a string or an int to a float.
Args: n/a
Valid input types:
strint
Expected output types:
float
convert_to_int
Name:
convert_to_intDescription: Converts a string or a float to an int.
Args: n/a
Valid input types:
strfloat
Expected output types:
int
convert_to_str
Name:
convert_to_strDescription: Converts an int or a float to a string.
Args: n/a
Valid input types:
intfloat
Expected output types:
string
Math
average
Name:
averageDescription: Calculates the average of values in an array.
Args:
round_precisionType:
intRequired:
false
Valid input types:
[int][float]
Expected output types:
float
max
Name:
maxDescription: Finds the greatest value in an array.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
min
Name:
minDescription: Finds the smallest value in an array.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
product
Name:
productDescription: Returns the multiplication product of all array values.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
Was this helpful?

