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

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.

Parameter
Description
Example
Required

input

The input text.

Visit our website at https://www.example.com

Yes

Example

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

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.

Yes

pattern

A regular expression to match.

ORD[0-9]+

Yes

Example

Last updated

Was this helpful?