Extract lines, words, characters, URLs, numbers, or patterns from a text.
Overview
This collection of operations is used to extract specific elements from a text, including lines, words, characters, URLs, numbers, and patterns.
1. Extract Words
This operation extracts individual words from a text. A word is a contiguous collection of characters delimited by a space.
Syntax
the text is "{input}"
get the text's words
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
Parameter
Description
Example
Required
input
The input text.
She quickly ran to the store.
Yes
Example
the sentence is "She quickly ran to the store."
get the sentence's words
She
quickly
ran
to
the
store.
2. Extract Lines
This operation extracts individual lines from a text. A line refers to a single row of text that is typically separated by a line break or new line character.
Syntax
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
Parameter
Description
Example
Required
input
The input text.
The quick brown fox jumps over the lazy dog. It loves to run fast. The dog watches quietly. Both enjoy the open field.
Yes
Example
3. Extract Characters
This operation extracts individual characters from a text.
Syntax
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
Parameter
Description
Example
Required
input
The input text.
Be kind
Yes
Example
4. Extract URLs
This operation extracts URLs from a text.
Syntax
Note: The terms url(s) or URL(s) can be used in any case and in either singular or plural form.
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
Implementation Detail: This is the regular expression used internally to find URLs in a given text:
((http|https)://)?\[a-zA-Z0-9./?:@-_\=#]+.(\[a-zA-Z]){2,6}(\[a-zA-Z0-9.&/?:@-_\=#])\*
5. Extract Numbers
This operation extracts numbers from a text.
Syntax
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameters are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.
Parameter
Description
Example
Required
input
The input text.
There are 150 apples and 35 oranges in the basket.
Yes
Example
6. Extract Substring
This operation extracts substrings from a text.
Syntax
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
Data Name
Can Be Renamed
the text
Yes
Parameters
Parameter
Description
Examples
Required
input
The input text.
The order number is ORD123456 and should be processed by tomorrow.
the paragraph is "The quick brown fox jumps over the lazy dog. \n It loves to run fast. \n The dog watches quietly. \n Both enjoy the open field."
get the paragraph's lines
The quick brown fox jumps over the lazy dog.
It loves to run fast.
The dog watches quietly.
Both enjoy the open field.
the text is "{input}"
get the text's characters
the saying is "Be kind"
get the saying's characters
B
e
k
i
n
d
the text is "{input}"
get the text's URLs
the subheader is "Visit our website at https://www.example.com"
get the subheader's url
https://www.example.com
the text is "{input}"
get the text's numbers
the sentence is "There are 150 apples and 35 oranges in the basket."
get the sentence's numbers
150
35
the text is "{input}"
get the text's substrings which match "{pattern}"
the text is "The order number is ORD123456 and should be processed by tomorrow."
get the text's substrings which match "ORD[0-9]+"