Ask AI
Skip to main content

Between

Function: Between

This action helps you extract a specific piece of text that lies between two other defined pieces of text within a larger body of text. It's like finding a specific word or phrase by knowing what comes right before it and right after it.

Input,

  • Text (STRING, Required): The complete line of text from which you want to extract a smaller part.
  • Start character (STRING, Required): The character(s) or phrase that marks the beginning of the text you want to extract.
  • End character (STRING, Required): The character(s) or phrase that marks the end of the text you want to extract.

Output,

  • Result (STRING): The name of the variable where the extracted text will be stored. By default, this will be named "RESULT". If no text is found between the specified start and end characters, this variable will be empty.

Execution Flow,

Real-Life Examples,

Here are some practical ways you can use the "Between" action:

  1. Extracting a Product ID from a Web Address Imagine you have a web address for a product and you need to get just the product's unique identifier.

    • Inputs:
      • Text: https://yourstore.com/products/PROD12345/details
      • Start character: /products/
      • End character: /details
    • Result: The variable RESULT will contain PROD12345.
  2. Getting a User's Name from a System Log Entry If you're processing system logs and want to quickly pull out the username from a specific log message.

    • Inputs:
      • Text: [INFO] 2023-10-27 10:30:00 - User 'alice.smith' logged in successfully.
      • Start character: User '
      • End character: ' logged in successfully.
    • Result: The variable RESULT will contain alice.smith.
  3. Isolating a Price from a Product Description When you have a product description that includes the price, and you need to extract only the numerical price value.

    • Inputs:
      • Text: Our amazing new gadget! Features: lightweight, durable. Price: $199.99. Order now!
      • Start character: Price: $
      • End character: . Order now!
    • Result: The variable RESULT will contain 199.99.