Extract Elements from Text
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.
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.
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
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
the text is "{input}"
get the text's lines
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
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.
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
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
3. Extract Characters
This operation extracts individual characters from a text.
Syntax
the text is "{input}"
get the text's characters
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
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.
input
The input text.
Be kind
Yes
Example
the saying is "Be kind"
get the saying's characters
4. Extract URLs
This operation extracts URLs from a text.
Syntax
the text is "{input}"
get the text's URLs
Note: The terms
url(s)
orURL(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.
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.
Example
the subheader is "Visit our website at https://www.example.com"
get the subheader's url
Notes
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
the text is "{input}"
get the text's numbers
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
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.
input
The input text.
There are 150 apples and 35 oranges in the basket.
Yes
Example
the sentence is "There are 150 apples and 35 oranges in the basket."
get the sentence's numbers
6. Extract Substring
This operation extracts substrings from a text.
Syntax
the text is "{input}"
get the text's substrings which match "{pattern}"
Data
The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.
the text
Yes
Parameters
input
The input text.
The order number is ORD123456 and should be processed by tomorrow.
Yes
pattern
A regular expression to match.
ORD[0-9]+
Yes
Example
the text is "The order number is ORD123456 and should be processed by tomorrow."
get the text's substrings which match "ORD[0-9]+"
Last updated
Was this helpful?