Ask AI
Skip to main content

Multi strip

Function: Multi strip

This function helps you clean up text by removing specific characters or phrases from the beginning or end of a larger piece of text. It's useful for tidying up data, removing unwanted prefixes or suffixes, or preparing text for further processing.

Input,

  • Text to Modify (Text): This is the main piece of text you want to clean.
  • Texts to Remove (List of Text): This is a list of one or more specific characters or phrases that you want to remove from the beginning or end of your "Text to Modify".

Output,

  • Result (Text): This is the cleaned-up text after the specified "Texts to Remove" have been taken out. By default, this will be stored in a variable named "RESULT".

Execution Flow,

Real-Life Examples,

Here are some practical ways you can use the "Multi strip" function:

Example 1: Cleaning up product codes

Imagine you have product codes that sometimes come with extra symbols at the beginning or end.

  • Inputs:
    • Text to Modify: ---PROD-12345---
    • Texts to Remove: ["-"]
  • Result: The Result variable will contain PROD-12345. The function removed all leading and trailing hyphens.

Example 2: Removing common delimiters from data

You might receive data where fields are enclosed in brackets or quotes that you need to remove.

  • Inputs:
    • Text to Modify: [[Important Message]]
    • Texts to Remove: ["[", "]"]
  • Result: The Result variable will contain Important Message. Both the opening and closing brackets were removed.

Example 3: Standardizing user input

If users sometimes add "Mr." or "Ms." to names, and you want to remove these titles for a standardized database entry.

  • Inputs:
    • Text to Modify: Mr. John Doe
    • Texts to Remove: ["Mr. ", "Ms. "]
  • Result: The Result variable will contain John Doe. The "Mr. " prefix was successfully removed.