Between
Function: Between
This function helps you extract a specific piece of text that lies between two other characters or phrases within a larger body of text. It's like finding a specific sentence or word in a paragraph by looking for what comes right before and right after it.
Input
- Text: The complete line of text from which you want to extract a smaller part.
- Type: Text
- Required: Yes
- Start character: The character(s) or phrase that marks the beginning of the text you want to extract.
- Type: Text
- Required: Yes
- End character: The character(s) or phrase that marks the end of the text you want to extract.
- Type: Text
- Required: Yes
Output
- Result: The name of the variable where the extracted piece of text will be stored. If no text is found between the specified start and end characters, this variable will be empty.
- Type: Text
- Default Value:
RESULT
Execution Flow
Real-Life Examples
Example 1: Extracting a Product Code from an Order ID
Imagine you have an order ID that includes a product code embedded within it, like ORD-XYZ123-2023. You want to get just the product code XYZ123.
- Inputs:
- Text:
ORD-XYZ123-2023 - Start character:
- - End character:
- - Result:
ProductCode
- Text:
- Result: A new variable named
ProductCodewill be created, containing the valueXYZ123.
Example 2: Getting a Customer's Name from an Email Subject
Suppose you receive an email subject line like [New Inquiry] Customer: John Doe - Regarding Order #123. You want to extract the customer's name.
- Inputs:
- Text:
[New Inquiry] Customer: John Doe - Regarding Order #123 - Start character:
Customer: - End character:
- - Result:
CustomerName
- Text:
- Result: A new variable named
CustomerNamewill be created, containing the valueJohn Doe.
Example 3: Isolating a URL Path from a Full URL
You have a full URL https://www.example.com/products/item-detail?id=456 and you only need the path part /products/item-detail.
- Inputs:
- Text:
https://www.example.com/products/item-detail?id=456 - Start character:
.com - End character:
? - Result:
URLPath
- Text:
- Result: A new variable named
URLPathwill be created, containing the value/products/item-detail.