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.

Data NameCan Be Renamed
the textYes

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.

ParameterDescriptionExampleRequired
inputThe 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

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.

Data NameCan Be Renamed
the textYes

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

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.

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.

Data NameCan Be Renamed
the textYes

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.

ParameterDescriptionExampleRequired
inputThe input text.Be kindYes

Example

the saying is "Be kind"
get the saying's characters
B
e
 
k
i
n
d

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) 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 NameCan Be Renamed
the textYes

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.

ParameterDescriptionExampleRequired
inputThe input text.Visit our website at https://www.example.comYes

Example

the subheader is "Visit our website at https://www.example.com"
get the subheader's url
https://www.example.com

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.

Data NameCan Be Renamed
the textYes

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.

ParameterDescriptionExampleRequired
inputThe 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
150
35

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.

Data NameCan Be Renamed
the textYes

Parameters

ParameterDescriptionExamplesRequired
inputThe input text.The order number is ORD123456 and should be processed by tomorrow.Yes
patternA 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]+"
ORD123456