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
element_textName:
element_textDescription: Extracts text from
html. Strips leading and trailing whitespaces.Args: n/a
Valid input types:
htmlExpected output types:
str
xpath
xpathName:
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
xpath_oneName:
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
cssName:
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
css_oneName:
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
amount_from_stringName:
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
amount_range_from_stringName:
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
joinName:
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
regex_find_allName:
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
regex_searchName:
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
regex_substringName:
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
lengthName:
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
select_nthName:
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
convert_to_floatName:
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
convert_to_intName:
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
convert_to_strName:
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
averageName:
averageDescription: Calculates the average of values in an array.
Args:
round_precisionType:
intRequired:
false
Valid input types:
[int][float]
Expected output types:
float
max
maxName:
maxDescription: Finds the greatest value in an array.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
min
minName:
minDescription: Finds the smallest value in an array.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
product
productName:
productDescription: Returns the multiplication product of all array values.
Args: n/a
Valid input types:
[float][int]
Expected output types:
floatint
Last updated
Was this helpful?

